Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: