Fibonacci Hashing: The Optimization that the World Forgot (or: a Better Alternative to Integer Modulo) | Probably Dance
All of my hash tables now use Fibonacci hashing by default. For my flat_hash_map the property of breaking up sequential numbers is particularly important because I have had real problems caused by sequential numbers. For the others it’s just a faster default. It might almost make the option to use the power of two integer modulo unnecessary.
Vanhoja ideoita kannattaa kokeilla uudelleen. Niiden seasta löytyy välillä helmiä, jotka ratkaisee sekä vanhoja että tuoreita ongelmia.
Lue muita postauksia