Hacker News new | ask | show | jobs
by morelisp 1325 days ago
50% load factor would be incredibly low for any hash table. Go uses 6.5/8 per bucket right now I believe, or 81% if you want to be crass about it.
1 comments

> 50% load factor would be incredibly low for any hash table.

Might be that I’m more used to open addressing maps? IIRC circa 50 is a pretty good starting point for open addressing unless the collision resolution is specifically designed for that (e.g. swisstable). Not to say it can’t get higher, but for some the that’s where the performance starts going down (e.g. non-bucketed cuckoo hashing).

Sure, if you grab an algorithms 101 textbook and implement its example of an open addressing table, 50% is a performance inflection point, but nobody is really using such things. And even then I recall seeing numbers more like 70% before actually doubling due to the high cost of rehash; 50% was only for the initial allocation.