News for hackers. Stuff that matters.
Re:Fibonacci Hashing: The Optimization That the World Forgot by IshKebab on Sunday June 17, 2018 @10:19AM (#17332459)
Actually there is something special about the using the golden ratio. By some measure it is "the most irrational" number, and that property makes it really good at distributing numbers evenly along an interval.

You can use it to generate a nice sequence of different colours - set the hue to (n * the golden ratio) mod 1.

But I don't know if that property is really necessary for a hash table. I guess only if you are using a terrible key hash.

There are no comments on this comment yet.