diff options
| author | tylo <[email protected]> | 2020-08-19 18:14:53 +0200 |
|---|---|---|
| committer | tylo <[email protected]> | 2020-08-19 18:14:53 +0200 |
| commit | fdf71253f9ff323d30dc51a15bbc67a9ff947562 (patch) | |
| tree | e74b380f251e7ac6d361daed11b0bb6703afd83d /examples | |
| parent | 99d4e88ee4496168d7bbdd667c9c88298e6c0104 (diff) | |
| download | STC-modified-fdf71253f9ff323d30dc51a15bbc67a9ff947562.tar.gz STC-modified-fdf71253f9ff323d30dc51a15bbc67a9ff947562.zip | |
Minor cleanup.
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)
|
