5 ms·
C++'s `std::unordered_[map|set]` has a requirement that the addresses of objects in the map don't change on a reallocation -- this forces it to use buckets with
by bbqbbqbbq 4y ago
C++'s `std::unordered_[map|set]` has a requirement that the addresses of objects in the map don't change on a reallocation -- this forces it to use buckets with linked lists under the hood. Try absl::flat_hash_set (https://github.com/abseil/abseil-cpp/blob/master/absl/container/flat_hash_set.h https://github.com/abseil/abseil-cpp/blob/master/absl/contai...) and see how it goes.