1 // Copyright (c) 2016-2017 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
7 #include <bench/bench.h>
10 static void RollingBloom(benchmark::State
& state
)
12 CRollingBloomFilter
filter(120000, 0.000001);
13 std::vector
<unsigned char> data(32);
16 while (state
.KeepRunning()) {
20 data
[2] = count
>> 16;
21 data
[3] = count
>> 24;
24 data
[0] = count
>> 24;
25 data
[1] = count
>> 16;
28 match
+= filter
.contains(data
);
32 BENCHMARK(RollingBloom
, 1500 * 1000);