3 ms·
map is a red and black tree, unordered_map is a hash table. Operations have the typical complexity of the data structure. Nothing fancy.
by user5994461 10y ago
map is a red and black tree, unordered_map is a hash table.
Operations have the typical complexity of the data structure. Nothing fancy.
- trishume 10y agoExactly. I predicted every benchmark result except for the trie one, which surprised me a ton (wut??!! but pointer chasing costs!), apparently though that was just bad benchmarking putting the only path ever tested in cache.