2 ms·
if you want a fast hash map, just use a library that is built specifically around a particular implementation strategy. std unordered map is slow by design for
by mgaunard 2y ago
if you want a fast hash map, just use a library that is built specifically around a particular implementation strategy.
std unordered map is slow by design for several reasons.
Things of interest are:
- open addressing method: linear, quadratic, robinhood, hybrid
- the default hash function
- the logic for the number of buckets (power of two, prime) and associated hash projection (fibonacci, modulo).
Boost seems to be doing a decent job at this now.