File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727#include " mutation.h"
2828
2929#include < boost/intrusive/detail/slist_iterator.hpp>
30+ #include < boost/unordered/detail/fca.hpp>
31+ #include < boost/unordered/detail/implementation.hpp>
3032#include < cinttypes>
3133#include < cstring>
3234#include < string>
Original file line number Diff line number Diff line change 2828
2929#include < boost/intrusive/slist.hpp>
3030#include < boost/intrusive/slist_hook.hpp>
31- #include < boost/unordered_map .hpp>
31+ #include < boost/unordered/unordered_flat_map .hpp>
3232#include < algorithm>
3333#include < atomic>
3434#include < cstddef>
@@ -397,8 +397,15 @@ class mutation_queue
397397
398398 // rather than real hash key, where deserialize will consume cpu.
399399 // partition_hash => count
400+ //
401+ // TODO(wangdan): consider comparing performance between boost::unordered_flat_map
402+ // and absl::flat_hash_map, both of which are based on open addressing.
403+ // Introducing absl::flat_hash_map is very easy, just by:
400404 // using row_lock_map = absl::flat_hash_map<uint64_t, size_t>;
401- using row_lock_map = boost::unordered_map<uint64_t , size_t >;
405+ // I've tried to introduce absl::flat_hash_map; however, it could not pass the ASAN
406+ // tests due to segmentation fault caused by dereferencing a null pointer inside
407+ // "absl/container/internal/raw_hash_set.h". I'll try it again later.
408+ using row_lock_map = boost::unordered_flat_map<uint64_t , size_t >;
402409 row_lock_map _row_locks;
403410};
404411
You can’t perform that action at this time.
0 commit comments