diff options
Diffstat (limited to 'src/cells/spread_sketch.c')
| -rw-r--r-- | src/cells/spread_sketch.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cells/spread_sketch.c b/src/cells/spread_sketch.c index c2dee92..8e98f80 100644 --- a/src/cells/spread_sketch.c +++ b/src/cells/spread_sketch.c @@ -6,6 +6,15 @@ #include <assert.h> #include "xxhash/xxhash.h" + +// XXHASH is faster for long string keys +#define HASH_FUNCTION(keyptr, keylen, hashv) \ + do { \ + hashv = XXH3_64bits(keyptr, keylen); \ + } while (0) +#define HASH_BLOOM 16 // https://troydhanson.github.io/uthash/userguide.html#_bloom_filter_faster_misses +// Reasonable values for the size of the Bloom filter are 16-32 bits. Since cube often has items less than 1000, 16 bits is fairly enough. + #include "uthash.h" #include "spread_sketch.h" |
