3 ms·
Depending on element size, maps implemented with binary trees instead of hash tables could give even faster results, with guaranteed O(log n), and without requi
by faragon 10y ago
Depending on element size, maps implemented with binary trees instead of hash tables could give even faster results, with guaranteed O(log n), and without requiring rehashing.
- q3r3qr3q 10y agoFor which sizes is this?
- faragon 10y agoE.g. compare C++ std::map vs std::unordered_map on strings. You can find some benchmarks here: https://github.com/faragon/libsrt/blob/master/doc/benchmarks.md https://github.com/faragon/libsrt/blob/master/doc/benchmarks... (for 16 and 64 byte strings: cxx_map_s16, cxx_umap_s16, cxx_map_s64, cxx_umap_s64)