std::map search complexity is O(log n), whereas std::unordered_map is O(1).
Crude test proved that even in very small collections (five elements), unordered_map wins by a factor of 2.
A widespread conversion into unordered_map for performance reasons should be conducted, and std::unordered_map should be available without further imports everywhere in the codebase.
std::map search complexity is O(log n), whereas std::unordered_map is O(1). Crude test proved that even in very small collections (five elements), unordered_map wins by a factor of 2.
A widespread conversion into unordered_map for performance reasons should be conducted, and std::unordered_map should be available without further imports everywhere in the codebase.