aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphyBrackets <singh.shivamsingh2003@gmail.com>2022-02-19 15:12:01 +0530
committerfanquake <fanquake@gmail.com>2022-04-06 13:57:31 +0100
commitfff91418ffa4911f7262e824418af664b25d4026 (patch)
tree58bb1bacc5d243f0c914f2460f863f95a4362be6
parentd906329c28c24b3e9e4471bf0ebb22af3503e419 (diff)
refactor: Remove deduplication of data in rollingbloom bench
-rw-r--r--src/bench/rollingbloom.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/bench/rollingbloom.cpp b/src/bench/rollingbloom.cpp
index 9f1679aa84..8f05e3bad0 100644
--- a/src/bench/rollingbloom.cpp
+++ b/src/bench/rollingbloom.cpp
@@ -5,6 +5,9 @@
#include <bench/bench.h>
#include <common/bloom.h>
+#include <crypto/common.h>
+
+#include <vector>
static void RollingBloom(benchmark::Bench& bench)
{
@@ -13,16 +16,10 @@ static void RollingBloom(benchmark::Bench& bench)
uint32_t count = 0;
bench.run([&] {
count++;
- data[0] = count & 0xFF;
- data[1] = (count >> 8) & 0xFF;
- data[2] = (count >> 16) & 0xFF;
- data[3] = (count >> 24) & 0xFF;
+ WriteLE32(data.data(), count);
filter.insert(data);
- data[0] = (count >> 24) & 0xFF;
- data[1] = (count >> 16) & 0xFF;
- data[2] = (count >> 8) & 0xFF;
- data[3] = count & 0xFF;
+ WriteBE32(data.data(), count);
filter.contains(data);
});
}