hyb
hyb
Link error on mac/m2 . it's no problem use eraly version duplicate symbol '__ZdaPv' in: /Users/Carolin.Huang/Downloads/quic120/benchmark/client/CMakeFiles/bclient.dir/client.cpp.o /Users/Carolin.Huang/Downloads/quic120/benchmark/client/CMakeFiles/bclient.dir/Users/Carolin.Huang/Downloads/quic120/sdk/rpmalloc/rpmalloc.c.o duplicate symbol '__ZdlPv' in: /Users/Carolin.Huang/Downloads/quic120/benchmark/client/CMakeFiles/bclient.dir/client.cpp.o /Users/Carolin.Huang/Downloads/quic120/benchmark/client/CMakeFiles/bclient.dir/Users/Carolin.Huang/Downloads/quic120/sdk/rpmalloc/rpmalloc.c.o duplicate symbol '__ZnwmRKSt9nothrow_t' in: /Users/Carolin.Huang/Downloads/quic120/benchmark/client/CMakeFiles/bclient.dir/client.cpp.o /Users/Carolin.Huang/Downloads/quic120/benchmark/client/CMakeFiles/bclient.dir/Users/Carolin.Huang/Downloads/quic120/sdk/rpmalloc/rpmalloc.c.o duplicate...
use the follow twos. https://github.com/ktprime/emhash/blob/master/hash_table7.hpp and https://github.com/ktprime/emhash/blob/master/thirdparty/emilib/emilib2.hpp I collect many third-payty flat hash-map implementions and benchmarsks, you can make and test it.
@renzibei I fix compile issiue in file hash_table7.hpp by adding compile marco EMH_BUCKET_INDEX=2, but emilib2.hpp is x86 only(sse2). your benchmark is some like martinus's code and more better. I think...
add "ADD_DEFINITIONS(-EMH_BUCKET_INDEX=2)" in cmakelist.txt or #define EMH_BUCKET_INDEX 2 in Map.h #pragma once ``` #include "Hash.h" #include "Allocator.h" #define EMH_BUCKET_INDEX 2 #include "emhash/hash_table7.hpp" static const char* MAP_NAME = "emhash7::hashmap"; template using...
Performance depends on cpu/compiler/test case/hash/data, emilib2 migrats from absl::flat_hash_map with some optimization, in my owner benchmark it's fast than absl and emhash7 on average. emhash7 can set high load factor...
emhash focus optimization on find_hit/insertion/iteration/copy/clear performance. the key&value and index(int) is in same entry(fast with small or very large datasets) find missing is inefficient compared with other flat hash map...
https://www.reddit.com/r/cpp/comments/ve3qbx/updating_map_benchmarks_send_your_hashmaps
考虑到复杂度暂时没加入Alloc 参数,后续可以考虑实现
random Insert and erase **continue key** is another benchmark even it's not offten used by the other benchamrk. ``` #include "Map.h" #include "bench.h" #include "hex.h" #include "sfc64.h" #include #include BENCHMARK(RandomInsertEraseContinue)...
u are right, maybe I need remove some marcos.