16 std::vector<uint8_t> key(32,0);
20 std::vector<uint8_t> in(buffersize,0);
21 std::vector<uint8_t> out(buffersize,0);
22 bench.
batch(in.size()).unit(
"byte").
run([&] {
23 ctx.Crypt(in.data(), out.data(), in.size());
static const uint64_t BUFFER_SIZE_SMALL
static const uint64_t BUFFER_SIZE_LARGE
static void CHACHA20_256BYTES(benchmark::Bench &bench)
A class for ChaCha20 256-bit stream cipher developed by Daniel J.
static void CHACHA20(benchmark::Bench &bench, size_t buffersize)
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
static secp256k1_context * ctx
static void CHACHA20_64BYTES(benchmark::Bench &bench)
static void CHACHA20_1MB(benchmark::Bench &bench)
BENCHMARK(CHACHA20_64BYTES)
static const uint64_t BUFFER_SIZE_TINY
Main entry point to nanobench's benchmarking facility.
ANKERL_NANOBENCH(NODISCARD) std Bench & batch(T b) noexcept
Sets the batch size.