mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
Explain how the GOLDEN_RATIO constant was calculated.
This commit is contained in:
parent
2555b01f28
commit
afab90e1d6
@ -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