|
|
|
|
|
by dahart
2296 days ago
|
|
Awesome! > The table uses power-of-two sizes instead of prime numbers because pow2/AND masking is a fast single instruction and the modulo operator is much slower. I was under the impression that the idea of prime number hash table sizes being faster was shredded a couple decades ago? Maybe by Bob Jenkins? |
|
These days, the preferred solution to this is usually to just use a better hash function without periodicity issues, so the bucketing no longer matters.