0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-08 10:31:50 -05:00

refactor: Remove deduplication of data in rollingbloom bench

This commit is contained in:
phyBrackets 2022-02-19 15:12:01 +05:30 committed by fanquake
parent d906329c28
commit fff91418ff
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -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);
});
}