15 std::vector<uint256> leaves;
17 for (
auto& item : leaves) {
21 bool mutation =
false;
23 leaves[mutation] = hash;
uint256 rand256() noexcept
generate a random uint256.
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.
Bench & batch(T b) noexcept
Sets the batch size.
Bench & unit(char const *unit)
Sets the operation unit.
uint256 ComputeMerkleRoot(std::vector< uint256 > hashes, bool *mutated)
static void MerkleRoot(benchmark::Bench &bench)
BENCHMARK(MerkleRoot, benchmark::PriorityLevel::HIGH)