26 std::optional<std::pair<SteadyClock::duration, uint32_t>>
best;
30 std::vector<SteadyClock::duration>
benches;
33 for (
int b = 0; b < 11; ++b) {
34 if (!Minisketch::ImplementationSupported(BITS, impl))
break;
35 Minisketch
sketch(BITS, impl, 32);
36 auto start = SteadyClock::now();
38 sketch.Add(
e*1337 + b*13337 + offset);
41 sketch.Add(
e*1337 + b*13337 + offset);
43 offset += (*
sketch.Decode(32))[0];
44 auto stop = SteadyClock::now();
56 LogInfo(
"Using Minisketch implementation number %i",
best->second);
Minisketch MakeMinisketch32FP(size_t max_elements, uint32_t fpbits)
Wrapper around Minisketch::CreateFP.
Minisketch MakeMinisketch32(size_t capacity)
Wrapper around Minisketch::Minisketch(32, implementation, capacity).
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.