mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-13 10:21:34 +02:00
refactor: Remove deduplication of data in rollingbloom bench
This commit is contained in:
parent
d906329c28
commit
fff91418ff
@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
#include <bench/bench.h>
|
#include <bench/bench.h>
|
||||||
#include <common/bloom.h>
|
#include <common/bloom.h>
|
||||||
|
#include <crypto/common.h>
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
static void RollingBloom(benchmark::Bench& bench)
|
static void RollingBloom(benchmark::Bench& bench)
|
||||||
{
|
{
|
||||||
@ -13,16 +16,10 @@ static void RollingBloom(benchmark::Bench& bench)
|
|||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
bench.run([&] {
|
bench.run([&] {
|
||||||
count++;
|
count++;
|
||||||
data[0] = count & 0xFF;
|
WriteLE32(data.data(), count);
|
||||||
data[1] = (count >> 8) & 0xFF;
|
|
||||||
data[2] = (count >> 16) & 0xFF;
|
|
||||||
data[3] = (count >> 24) & 0xFF;
|
|
||||||
filter.insert(data);
|
filter.insert(data);
|
||||||
|
|
||||||
data[0] = (count >> 24) & 0xFF;
|
WriteBE32(data.data(), count);
|
||||||
data[1] = (count >> 16) & 0xFF;
|
|
||||||
data[2] = (count >> 8) & 0xFF;
|
|
||||||
data[3] = count & 0xFF;
|
|
||||||
filter.contains(data);
|
filter.contains(data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user