skarupke / flat_hash_map

A very fast hashtable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

missing a fast_hash_map::merge

yvdriess opened this issue · comments

The merge() function in part of the std::unordered_map interface since C++17. https://en.cppreference.com/w/cpp/container/unordered_map/merge

Is there an implementation-specific trick that can speed up merging two fast_hash_map tables, compared to the iteration+insertion loop? This operation can be destructive to the source container.

Some context: I am dealing with a large amount of relatively small (~ 4kb, page size) tables that regularly get merged and cleared (without dealloc). This happens enough that the performance of the merge is critical.