We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d906329 commit fff9141Copy full SHA for fff9141
src/bench/rollingbloom.cpp
@@ -5,6 +5,9 @@
5
6
#include <bench/bench.h>
7
#include <common/bloom.h>
8
+#include <crypto/common.h>
9
+
10
+#include <vector>
11
12
static void RollingBloom(benchmark::Bench& bench)
13
{
@@ -13,16 +16,10 @@ static void RollingBloom(benchmark::Bench& bench)
16
uint32_t count = 0;
14
17
bench.run([&] {
15
18
count++;
- data[0] = count & 0xFF;
- data[1] = (count >> 8) & 0xFF;
- data[2] = (count >> 16) & 0xFF;
19
- data[3] = (count >> 24) & 0xFF;
+ WriteLE32(data.data(), count);
20
filter.insert(data);
21
22
- data[0] = (count >> 24) & 0xFF;
23
- data[1] = (count >> 16) & 0xFF;
24
- data[2] = (count >> 8) & 0xFF;
25
- data[3] = count & 0xFF;
+ WriteBE32(data.data(), count);
26
filter.contains(data);
27
});
28
}
0 commit comments