diff options
| author | Tyge Løvset <[email protected]> | 2021-02-13 21:06:29 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-02-13 21:06:29 +0100 |
| commit | e1c7b3c9b996e15eb2218ff5953c0fcfd846fa85 (patch) | |
| tree | f14bad06c8475a253618d2e1c8257f98dc5b65b2 /benchmarks/cmap_benchmark2.cpp | |
| parent | 06446ac73cf8c5daaebc72be05ce606f4c7d1a2b (diff) | |
| download | STC-modified-e1c7b3c9b996e15eb2218ff5953c0fcfd846fa85.tar.gz STC-modified-e1c7b3c9b996e15eb2218ff5953c0fcfd846fa85.zip | |
Replaced default hash for cmap.
Diffstat (limited to 'benchmarks/cmap_benchmark2.cpp')
| -rw-r--r-- | benchmarks/cmap_benchmark2.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/benchmarks/cmap_benchmark2.cpp b/benchmarks/cmap_benchmark2.cpp index 4d6db980..6f016d1d 100644 --- a/benchmarks/cmap_benchmark2.cpp +++ b/benchmarks/cmap_benchmark2.cpp @@ -15,13 +15,6 @@ enum {N1 = 4000000, S1 = 1, MaxLoadFactor100 = 80};
uint64_t seed = time(NULL);
-static inline uint32_t hash32(const void* data, size_t len) {
- return *(const uint32_t *)data * 2654435769u;
-}
-static inline uint32_t hash64(const void* data, size_t len) {
- uint64_t x = *(const uint64_t *)data * 11400714819323198485ull;
- return x ^ (x >> 24);
-}
template <class K, class V> using umap = std::unordered_map<K, V>;
template <class K, class V> using bmap = ska::bytell_hash_map<K, V>;
template <class K, class V> using fmap = ska::flat_hash_map<K, V>;
@@ -41,8 +34,8 @@ DEFMAP(map_i, <int, int>); DEFMAP(map_x, <uint64_t, uint64_t>);
DEFMAP(map_s, <std::string, std::string>);
-using_cmap(i, int, int, c_default_equals, hash32);
-using_cmap(x, uint64_t, uint64_t, c_default_equals, hash64);
+using_cmap(i, int, int, c_default_equals, c_default_hash32);
+using_cmap(x, uint64_t, uint64_t, c_default_equals, c_default_hash64);
using_cmap_strkey(s, cstr, cstr_del, cstr_clone);
PICOBENCH_SUITE("Map1");
|
