Hacker News new | ask | show | jobs
by noctune 2352 days ago
One reason why unordered map is slow is that it has to be a chained hash map due to the spec not allowing iterator invalidation when resizing.
2 comments

I believe unordered_map does invalidate integrators on resize, but does not invalidate references to keys/data, which means the data can’t be stored inline with the hash table structure.
that's certainly annoying...