diff options
author | phyBrackets <singh.shivamsingh2003@gmail.com> | 2022-02-19 15:12:01 +0530 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-04-06 13:57:31 +0100 |
commit | fff91418ffa4911f7262e824418af664b25d4026 (patch) | |
tree | 58bb1bacc5d243f0c914f2460f863f95a4362be6 /src/bench/rollingbloom.cpp | |
parent | d906329c28c24b3e9e4471bf0ebb22af3503e419 (diff) | |
download | bitcoin-fff91418ffa4911f7262e824418af664b25d4026.tar.xz |
refactor: Remove deduplication of data in rollingbloom bench
Diffstat (limited to 'src/bench/rollingbloom.cpp')
-rw-r--r-- | src/bench/rollingbloom.cpp | 13 |
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); }); } |