summaryrefslogtreecommitdiffhomepage
path: root/benchmarks
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2022-07-15 00:19:40 +0200
committerTyge Lovset <[email protected]>2022-07-15 00:19:40 +0200
commit293af54c54a4864f80ad3f9520ad4d2f85723aa1 (patch)
tree638e6dcd113eb0026942c121b09c74d909d22d43 /benchmarks
parent839efba934c8623f2dea31e7f8bb2857624c6908 (diff)
downloadSTC-modified-293af54c54a4864f80ad3f9520ad4d2f85723aa1.tar.gz
STC-modified-293af54c54a4864f80ad3f9520ad4d2f85723aa1.zip
cmap: No longer uses c_umul128. If `i_size` is defined by user, table is power of 2 length and bit-masking used for mapping hash to index.
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/shootout_hashmaps.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/benchmarks/shootout_hashmaps.cpp b/benchmarks/shootout_hashmaps.cpp
index 2ae4bf11..9c9bce27 100644
--- a/benchmarks/shootout_hashmaps.cpp
+++ b/benchmarks/shootout_hashmaps.cpp
@@ -31,8 +31,9 @@ KHASH_MAP_INIT_INT64(ii, int64_t)
// cmap template expansion
#define i_key int64_t
#define i_val int64_t
-#define i_tag ii
+#define i_size uint32_t // optional, enables 2x expand
#define i_hash(x) (*x * 0xc6a4a7935bd1e99d) // optional
+#define i_tag ii
#include <stc/cmap.h>
#define SEED(s) rng = stc64_new(s)