1#include <benchmark/benchmark.h>
10using namespace benchmark;
19Builder generate_trace(
size_t target_num_gates)
23 using Fr =
typename G1::Fr;
27 typename G1::element
a = generators[0];
28 typename G1::element
b = generators[1];
34 size_t num_iterations = target_num_gates / 163;
35 for (
size_t _ = 0; _ < num_iterations; _++) {
36 op_queue->add_accumulate(
a);
37 op_queue->mul_accumulate(
a, x);
38 op_queue->mul_accumulate(
b, x);
39 op_queue->mul_accumulate(
b, y);
40 op_queue->add_accumulate(
a);
41 op_queue->mul_accumulate(
b, x);
42 op_queue->eq_and_reset();
53void eccvm_generate_prover(State& state)
noexcept
56 size_t target_num_gates = 1 <<
static_cast<size_t>(state.range(0));
57 for (
auto _ : state) {
64void eccvm_prove(State& state)
noexcept
67 size_t target_num_gates = 1 <<
static_cast<size_t>(state.range(0));
71 for (
auto _ : state) {
78void eccvm_ipa(State& state)
noexcept
80 size_t target_num_gates = 1 <<
static_cast<size_t>(state.range(0));
85 for (
auto _ : state) {
91BENCHMARK(eccvm_generate_prover)->Unit(kMillisecond)->DenseRange(12, CONST_ECCVM_LOG_N);
92BENCHMARK(eccvm_prove)->Unit(kMillisecond)->DenseRange(12, CONST_ECCVM_LOG_N);
93BENCHMARK(eccvm_ipa)->Unit(kMillisecond)->DenseRange(12, CONST_ECCVM_LOG_N);
96int main(
int argc,
char** argv)
99 benchmark::Initialize(&argc, argv);
100 benchmark::RunSpecifiedBenchmarks();
101 benchmark::Shutdown();
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
BaseTranscript< Codec, HashFunction > Transcript
std::pair< Proof, OpeningClaim > construct_proof()
std::shared_ptr< ProvingKey > key
IPA (inner product argument) commitment scheme class.
int main(int argc, char **argv)
std::filesystem::path bb_crs_path()
void init_file_crs_factory(const std::filesystem::path &path)
Entry point for Barretenberg command-line interface.
constexpr std::span< const typename Group::affine_element > get_precomputed_generators()
BENCHMARK(bench_commit_structured_random_poly< curve::BN254 >) -> Unit(benchmark::kMillisecond)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
static field random_element(numeric::RNG *engine=nullptr) noexcept