mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Improve performance of hash (for use as dictionary keys)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21691 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
643c232713
commit
d7dcbb06b7
4 changed files with 66 additions and 3 deletions
|
@ -121,7 +121,7 @@
|
|||
val.d = [self doubleValue];
|
||||
for (i = 0; i < sizeof(double); i++)
|
||||
{
|
||||
hash += val.c[i];
|
||||
hash = (hash << 5) + hash + val.c[i];
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue