3 ms·
> only performs well up to 50-75% bucket usage. Robin Hood performs well into the high 90's.
by kevin_thibedeau 4y ago
> only performs well up to 50-75% bucket usage.
Robin Hood performs well into the high 90's.
- anarazel 4y agoOne situation where I painfully learned that it doesn't, is when you iterate over one hashtable to fill another. To defend against that one needs to add some per-hashtable randomized state into the hash IV. Through bad experience I also learned that you need to not just grow due to fillfactor, but also due to disproportional chain length, even with the above defense in place.
- 10000truths 4y ago> To defend against that one needs to add some per-hashtable randomized state into the hash IV. You should almost always be doing this anyways, since most hash tables use user-provided data as keys, which opens up a well known avenue for denial-of-service attacks: https://lwn.net/Articles/474912/ https://lwn.net/Articles/474912/
- anarazel 4y agoI think that's often fixed using a per run random seed, rather than a per table seed. The patch linked in the python bug linked from that article does seem to do that, for example.