News for hackers. Stuff that matters.
Re:Why Fibonacci? by sph on Wednesday November 18, 2026 @02:42AM (#50543041)
Serendipitous: I just learned about Fibonacci hashing, where you multiply a hash function by a certain factor derived from the golden ratio, which gives you better distribution when applied to something like a hash table.

https://probablydance.com/2018/06/16/fibonacci-hashing-the-o...

So if you find yourself doing:

    bucket = hash % total_buckets;
Consider introducing Fibonacci hashing.

And the reason this works, and provides uniform distribution is this: https://en.wikipedia.org/wiki/Equidistribution_theorem

Re:Why Fibonacci? by noduerme on Wednesday November 18, 2026 @05:00AM (#50544250)
Is this used for smoothing any other kinds of outputs that you know of? Like, say, removing noise from big data tables you're using for symbolic regression? I've never come across this before but it seems like it's got a lot of potential compared to other methods.
Re:Why Fibonacci? by senderista on Wednesday November 18, 2026 @12:43PM (#50549459)
It works well IME for permuting sequential integers, but not that well in general because multiplication mixes low bits into high bits but not vice versa. You need something like right shift-XOR after multiplication to do both.