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;
static void GCSBlockFilterGetHash(benchmark::Bench &bench)
static void GCSFilterDecodeSkipCheck(benchmark::Bench &bench)
constexpr uint32_t BASIC_FILTER_M
static void GCSFilterConstruct(benchmark::Bench &bench)
static void GCSFilterDecode(benchmark::Bench &bench)
constexpr uint8_t BASIC_FILTER_P
BENCHMARK(GCSBlockFilterGetHash, benchmark::PriorityLevel::HIGH)
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
static void GCSFilterMatch(benchmark::Bench &bench)
Complete block filter struct as defined in BIP 157.
This implements a Golomb-coded set as defined in BIP 158.
std::unordered_set< Element, ByteVectorHash > ElementSet
static GCSFilter::ElementSet GenerateGCSTestElements()
std::vector< unsigned char > Element
Main entry point to nanobench's benchmarking facility.
const std::vector< unsigned char > & GetEncoded() const LIFETIMEBOUND