Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
mega_zk_honk.bench.cpp
Go to the documentation of this file.
1#include <benchmark/benchmark.h>
2
5
6using namespace benchmark;
7using namespace bb;
8
12static void construct_proof_megahonk_zk(State& state,
13 void (*test_circuit_function)(MegaCircuitBuilder&, size_t)) noexcept
14{
15 size_t num_iterations = 10; // 10x the circuit
16 bb::mock_circuits::construct_proof_with_specified_num_iterations<MegaZKProver>(
17 state, test_circuit_function, num_iterations);
18}
19
23static void construct_proof_megahonk_power_of_2_zk(State& state) noexcept
24{
25 auto log2_of_gates = static_cast<size_t>(state.range(0));
26 bb::mock_circuits::construct_proof_with_specified_num_iterations<MegaZKProver>(
27 state, &bb::mock_circuits::generate_basic_arithmetic_circuit<MegaCircuitBuilder>, log2_of_gates);
28}
29
30// Define benchmarks
31
32// This exists due to an issue where get_row was blowing up in time
33BENCHMARK_CAPTURE(construct_proof_megahonk_zk, sha256, &generate_sha256_test_circuit<MegaCircuitBuilder>)
34 ->Unit(kMillisecond);
35BENCHMARK_CAPTURE(construct_proof_megahonk_zk, keccak, &stdlib::generate_keccak_test_circuit<MegaCircuitBuilder>)
36 ->Unit(kMillisecond);
37BENCHMARK_CAPTURE(construct_proof_megahonk_zk,
38 ecdsa_verification,
39 &stdlib::generate_ecdsa_verification_test_circuit<MegaCircuitBuilder>)
40 ->Unit(kMillisecond);
41
42BENCHMARK(construct_proof_megahonk_power_of_2_zk)
43 // 2**15 gates to 2**20 gates
44 ->DenseRange(15, 20)
45 ->Unit(kMillisecond);
46
BENCHMARK_MAIN()
Entry point for Barretenberg command-line interface.
BENCHMARK_CAPTURE(bench_round_mega, oink, [](auto &prover) { prover.run_oink_prover_on_each_incomplete_key();}) -> DenseRange(14, 20) -> Unit(kMillisecond)
BENCHMARK(vector_of_evaluations) -> DenseRange(15, 21) ->Unit(kMillisecond) ->Iterations(1)
KeccakF1600 keccak