3 ms·
> As you have a budget of 6ms per frame for 165 FPS, and you often need to iterate over many thousands of entities in each frame, std::unordered_map for one is
by jcelerier 6y ago
> As you have a budget of 6ms per frame for 165 FPS, and you often need to iterate over many thousands of entities in each frame, std::unordered_map for one is a non-starter.
that's when you use one of the two hundred alternative implementations which keeps the same API but offer different performance compromises & tradeoffs :
https://martin.ankerl.com/2019/04/01/hashmap-benchmarks-02-01-result-CtorDtorEmptyMap/ https://martin.ankerl.com/2019/04/01/hashmap-benchmarks-02-0...
If you prototyped with std::unordered_map you'll likely just have to change a couple types and add the relevant includes here and there, rerun your benchmarks, and tada.