19 while (data.size() < length) {
21 data.push_back(
digit);
30 bench.batch(data.size()).unit(
"base16").run([&] {
32 assert(result != std::nullopt);
uint64_t randbits(int bits) noexcept
Generate a random (bits)-bit integer.
Main entry point to nanobench's benchmarking facility.
void doNotOptimizeAway(Arg &&arg)
Makes sure none of the given arguments are optimized away by the compiler.
std::string generateHexString(size_t length)
static void HexParse(benchmark::Bench &bench)
std::optional< std::vector< Byte > > TryParseHex(std::string_view str)
Parse the hex string into bytes (uint8_t or std::byte).
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.