Menu

#UnOrderEd_map

2 posts

Feed·
2 of 2 posts
std::map vs std::unordered_map: The Iteration Contract Nobody Reads
📰
0Read More

std::map vs std::unordered_map: The Iteration Contract Nobody Reads

DEV Community: cpp·Naveen Karasu·9 days ago
#k6Q2xrPb
#devtocpp#devto#dev#include#order

Swapping std::map for std::unordered_map made my lookups faster and quietly reordered my output. Here is the ordering contract, the rehash, and the operator[] trap.

15s