6#include <blockfilter.h>
21 for (
int i = 0; i < 100000; ++i) {
23 element[0] =
static_cast<unsigned char>(i);
24 element[1] =
static_cast<unsigned char>(i >> 8);
25 elements.insert(std::move(element));
39 block_filter.GetHash();
47 uint64_t siphash_k0 = 0;
constexpr uint8_t BASIC_FILTER_P
constexpr uint32_t BASIC_FILTER_M
Complete block filter struct as defined in BIP 157.
This implements a Golomb-coded set as defined in BIP 158.
std::vector< unsigned char > Element
std::unordered_set< Element, ByteVectorHash > ElementSet
const std::vector< unsigned char > & GetEncoded() const LIFETIMEBOUND
Main entry point to nanobench's benchmarking facility.
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
static void GCSFilterConstruct(benchmark::Bench &bench)
static GCSFilter::ElementSet GenerateGCSTestElements()
static void GCSFilterDecode(benchmark::Bench &bench)
BENCHMARK(GCSBlockFilterGetHash, benchmark::PriorityLevel::HIGH)
static void GCSBlockFilterGetHash(benchmark::Bench &bench)
static void GCSFilterDecodeSkipCheck(benchmark::Bench &bench)
static void GCSFilterMatch(benchmark::Bench &bench)