3 ms·
Sure but the argument against STL wasn't performance but rather that it can allocate at all. So optimal unordered map implementations, like Google's absl::flat
by kllrnohj 6y ago
Sure but the argument against STL wasn't performance but rather that it can allocate at all.
So optimal unordered map implementations, like Google's absl::flat_hash_map or Facebook's F14 would be similarly banned as they internally allocate.
I'd definitely recommend those libraries over std::unordered_map for sure, but it's not like std::unordered_map is unusably slow or broken, either. It's fairly comparably to Java's HashMap that everyone uses without thinking about it.
- BenFrantzDale 6y agoYou can use pmr and then do no allocation in std containers.