Explain how the GOLDEN_RATIO constant was calculated.
git-svn-id: svn://10.0.0.236/trunk@140979 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
0eb4f1e6aa
commit
b3ad5c438f
@ -179,7 +179,7 @@ PL_HashTableDestroy(PLHashTable *ht)
|
||||
/*
|
||||
** Multiplicative hash, from Knuth 6.4.
|
||||
*/
|
||||
#define GOLDEN_RATIO 0x9E3779B9U
|
||||
#define GOLDEN_RATIO 0x9E3779B9U /* 2/(1+sqrt(5))*(2^32) */
|
||||
|
||||
PR_IMPLEMENT(PLHashEntry **)
|
||||
PL_HashTableRawLookup(PLHashTable *ht, PLHashNumber keyHash, const void *key)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user