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

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