-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Please read [contributing guidelines](CONTRIBUTING.md) and remove this line.
- Loading branch information
1 parent
3a49cfb
commit 2096dc2
Showing
42 changed files
with
613 additions
and
217 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
barretenberg/cpp/src/barretenberg/benchmark/ultra_bench/mega_zk_honk.bench.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#include <benchmark/benchmark.h> | ||
|
||
#include "barretenberg/benchmark/ultra_bench/mock_circuits.hpp" | ||
#include "barretenberg/stdlib_circuit_builders/mega_circuit_builder.hpp" | ||
|
||
using namespace benchmark; | ||
using namespace bb; | ||
|
||
/** | ||
* @brief Benchmark: Construction of a Ultra Honk proof for a circuit determined by the provided circuit function | ||
*/ | ||
static void construct_proof_megahonk_zk(State& state, | ||
void (*test_circuit_function)(MegaCircuitBuilder&, size_t)) noexcept | ||
{ | ||
size_t num_iterations = 10; // 10x the circuit | ||
bb::mock_circuits::construct_proof_with_specified_num_iterations<MegaZKProver>( | ||
state, test_circuit_function, num_iterations); | ||
} | ||
|
||
/** | ||
* @brief Benchmark: Construction of a Ultra Plonk proof with 2**n gates | ||
*/ | ||
static void construct_proof_megahonk_power_of_2_zk(State& state) noexcept | ||
{ | ||
auto log2_of_gates = static_cast<size_t>(state.range(0)); | ||
bb::mock_circuits::construct_proof_with_specified_num_iterations<MegaZKProver>( | ||
state, &bb::mock_circuits::generate_basic_arithmetic_circuit<MegaCircuitBuilder>, log2_of_gates); | ||
} | ||
|
||
// Define benchmarks | ||
|
||
// This exists due to an issue where get_row was blowing up in time | ||
BENCHMARK_CAPTURE(construct_proof_megahonk_zk, sha256, &stdlib::generate_sha256_test_circuit<MegaCircuitBuilder>) | ||
->Unit(kMillisecond); | ||
BENCHMARK_CAPTURE(construct_proof_megahonk_zk, keccak, &stdlib::generate_keccak_test_circuit<MegaCircuitBuilder>) | ||
->Unit(kMillisecond); | ||
BENCHMARK_CAPTURE(construct_proof_megahonk_zk, | ||
ecdsa_verification, | ||
&stdlib::generate_ecdsa_verification_test_circuit<MegaCircuitBuilder>) | ||
->Unit(kMillisecond); | ||
BENCHMARK_CAPTURE(construct_proof_megahonk_zk, | ||
merkle_membership, | ||
&stdlib::generate_merkle_membership_test_circuit<MegaCircuitBuilder>) | ||
->Unit(kMillisecond); | ||
|
||
BENCHMARK(construct_proof_megahonk_power_of_2_zk) | ||
// 2**15 gates to 2**20 gates | ||
->DenseRange(15, 20) | ||
->Unit(kMillisecond); | ||
|
||
BENCHMARK_MAIN(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
barretenberg/cpp/src/barretenberg/stdlib/honk_verifier/oink_recursive_verifier.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.