3 ms·
>some panacea for performance I said for latency, not performance in general. If you're generally working with maps with only 10s to 100s of small entries, it'
by logicchains 3y ago
>some panacea for performance
I said for latency, not performance in general. If you're generally working with maps with only 10s to 100s of small entries, it's easily possible to see a 10x reduction in worst-cost latency by switching from std::[unordered_]map to flat_map, due to a massive reduction in latency and pointer chasing (e.g. std::unordered_map allocates for every single insertion, and std::map lookup/pointer chasing often leads to log(n) cache misses).