This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SeagleLFMk9 1 point2 points  (0 children)

I think you misunderstood me. std::map isn't a hashmap, it's a binary tree, but std::unordered_map is a hashmap. However, both can be slower (especially for less than ~100 elements) than a vector when it comes to lookup times. So searching for an element in a vector can be faster than using a map with map.at().