diff options
| author | chenzizhan <[email protected]> | 2024-10-14 16:35:24 +0800 |
|---|---|---|
| committer | chenzizhan <[email protected]> | 2024-10-14 16:35:24 +0800 |
| commit | b36cea9c3dd7c386632c950cdfe392a329afc0b1 (patch) | |
| tree | 1d3c795060c5d697e281dbfd1cf2b455d420e2d8 | |
| parent | f0a4d5ae3c6f0c767ff11c5d9aa381badf83e4bc (diff) | |
Revert "performance: enable uthash bloom filter"
This reverts commit f0a4d5ae3c6f0c767ff11c5d9aa381badf83e4bc.
| -rw-r--r-- | src/cells/heavy_keeper.c | 3 | ||||
| -rw-r--r-- | src/cells/spread_sketch.c | 9 | ||||
| -rw-r--r-- | test/test_fuzz_test.cpp | 2 |
3 files changed, 1 insertions, 13 deletions
diff --git a/src/cells/heavy_keeper.c b/src/cells/heavy_keeper.c index ee21c2a..eff0c78 100644 --- a/src/cells/heavy_keeper.c +++ b/src/cells/heavy_keeper.c @@ -19,9 +19,6 @@ 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 heavy keeper often has items less than 1000, 16 bits is fairly enough. - #include "uthash.h" #include "exdata.h" diff --git a/src/cells/spread_sketch.c b/src/cells/spread_sketch.c index 8e98f80..c2dee92 100644 --- a/src/cells/spread_sketch.c +++ b/src/cells/spread_sketch.c @@ -6,15 +6,6 @@ #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" diff --git a/test/test_fuzz_test.cpp b/test/test_fuzz_test.cpp index 1278a9e..34c0711 100644 --- a/test/test_fuzz_test.cpp +++ b/test/test_fuzz_test.cpp @@ -475,7 +475,7 @@ TEST(Fuzz_test, many_instance_random_flow_unregister_calibrate_reset_fork_merge_ est_total += value_est; true_total += value_true; } - EXPECT_LE(abs(est_total - true_total) / true_total, 0.25); + EXPECT_LE(abs(est_total - true_total) / true_total, 0.2); // printf("spreadsketch Mean ratio e: %f\n", abs(est_total - true_total) / true_total); for (size_t j = 0; j < cell_num; j++) { |
