4 ms·
absl::btree_map and absl::btree_set are drop-in replacements for std::map and std::set that use b-trees under the covers. Worth noting that this simulation does
by asdfasgasdgasdg 7y ago
absl::btree_map and absl::btree_set are drop-in replacements for std::map and std::set that use b-trees under the covers. Worth noting that this simulation doesn't factor in pressure on the CPU cache, which means that even if you aren't under VM pressure, b-trees can still offer a speedup. They are also gentler to the allocator.
https://abseil.io/docs/cpp/guides/container#b-tree-ordered-containers https://abseil.io/docs/cpp/guides/container#b-tree-ordered-c...