diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/benchmark.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/examples/benchmark.c b/examples/benchmark.c index 3270bc3c..753f39b3 100644 --- a/examples/benchmark.c +++ b/examples/benchmark.c @@ -15,17 +15,12 @@ // Visual Studio: compile with -TP to force C++: cl -TP -EHsc -O2 benchmark.c
-static inline uint64_t rotl(uint64_t b, int n) {
- return (b << n) | (b >> (64 - n));
-}
-
-static inline uint32_t fibfast_hash(const void* data, size_t len) {
+static inline uint32_t fibonacci_hash(const void* data, size_t len) {
return ((*(const uint64_t *) data) * 11400714819323198485llu) >> 24;
}
-// cmap, khash implementations
-declare_cmap(ii, int64_t, int64_t, c_default_destroy, c_default_equals, fibfast_hash); // c_default_hash32);
-declare_cmap_str(ss, cstr_t, cstr_destroy);
+// cmap and khash template expansion
+declare_cmap(ii, int64_t, int64_t, c_default_destroy, c_default_equals, fibonacci_hash);
KHASH_MAP_INIT_INT64(ii, int64_t)
|
