3 ms·
Not only can't you do standards-conformant closed addressing hash map implementations of std::unordered_map I don't think you can do cuckoo- or robin-hood-hashi
by ErikCorry 4y ago
Not only can't you do standards-conformant closed addressing hash map implementations of std::unordered_map I don't think you can do cuckoo- or robin-hood-hashing either. It's just so restrictive.
Unordered maps are also annoying for a completely different reason: You generally want your program to run in a reproducible way and unordered maps will undermine that goal again and again in subtle ways you will discover too late. std::map doesn't scratch that itch because you have to provide an ordering function when 99% of the time insertion ordering would be just fine. I wrote about this at https://blog.toit.io/hash-maps-that-dont-hate-you-1a96150b492a https://blog.toit.io/hash-maps-that-dont-hate-you-1a96150b49...