AFAIK, these are slow in STL of C++. We have found some alternatives - policy based data structures (https://codeforces.com/blog/entry/60737, SparseHash by Google, `abseil::flat_hash_map`, `boost::unordered_map` (https://comp.lang.cpp.moderated.narkive.com/VPUab6if/performance-difference-between-std-unordered-map-and), https://codeforces.com/blog/entry/62393 - implementing our own hash map. Refer https://github.com/codezonediitj/pydatastructs/issues/438#issuecomment-975740922