HN Hall of Fame Weekly email

Fibonacci Hashing: The Optimization That the World Forgot

probablydance.com Essays & writing Essays & articles Computer science Class of 2023-04 Hall of Fame
Screenshot of probablydance.com captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 6 calendar years, with breakout response in 3 of them.

submissions
7
submitters
7
observed span
2018–2025
peak thread · 75 comments
405 pts
latest 20+ return · 2025-04-14
143 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

Don't do this. Use a real hash function that guarantees a highly random distribution, make your hash tables power-of-two sized, and map from hash value to table index using (hash & (size-1)). The fibonacci constant thing will help clean up the distribution of a bad hash function, but it does nothing for collision resistance if the underlying hash function is weak. -Austin, author of Murmurhash and SMHasher

I first learned this trick for generating hues for colors when you don't know how many you'll need. I think LibreOffice might do this. It always picks blue and orange for the first 2 series in a chart. But you can keep picking and it always has more colors that are just slightly different than all the previous ones.

Why the golden ratio? Because the continued fraction of the golden ratio is all 1's [0]. So it is uniquely hard to approximate with a rational number. The golden ratio is the bound on Hurwitz's theorem [1]. And avoiding a rational number is what you want for good hashing, because multiplying with a rational number doesn't mix your digits well. [0] https://codegolf.stackexchange.com/questions/48589/generate-... [1] https://en.m.wikipedia.org/wiki/Hurwitz%27s_theorem_(number_...

317070·143-point thread·

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
3

100+ points or 50+ comments

Total points
761

reference only — not used in Hall rules or ranking

Total comments
167

reference only — not used in Hall rules or ranking

Every submission