Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
relations.bench.cpp
Go to the documentation of this file.
5#include <benchmark/benchmark.h>
6
7namespace {
9}
10
12
13using Fr = bb::fr;
15
16// Generic helper for executing Relation::accumulate for the template specified input type
17template <typename Flavor, typename Relation, typename Input, typename Accumulator>
18void execute_relation(::benchmark::State& state)
19{
20 using FF = typename Flavor::FF;
21
23
24 // Instantiate zero-initialized inputs and accumulator
25 Input input{};
26 Accumulator accumulator;
27
28 for (auto _ : state) {
29 Relation::accumulate(accumulator, input, params, 1);
30 }
31}
32
33// Single execution of relation on values (FF), e.g. Sumcheck verifier work
34template <typename Flavor, typename Relation> void execute_relation_for_values(::benchmark::State& state)
35{
36 using Input = typename Flavor::AllValues;
37 using Accumulator = typename Relation::SumcheckArrayOfValuesOverSubrelations;
38
39 execute_relation<Flavor, Relation, Input, Accumulator>(state);
40}
41
42// Single execution of relation on Sumcheck univariates, i.e. Sumcheck/Decider prover work
43template <typename Flavor, typename Relation> void execute_relation_for_univariates(::benchmark::State& state)
44{
45 using Input = typename Flavor::ExtendedEdges;
47
48 execute_relation<Flavor, Relation, Input, Accumulator>(state);
49}
50
51// Ultra relations (Sumcheck prover work)
59
60// Goblin-Ultra only relations (Sumcheck prover work)
65
66// Ultra relations (verifier work)
74
75// Goblin-Ultra only relations (verifier work)
80
81// Translator VM
88
89// ECCVM
97
98} // namespace bb::benchmark::relations
99
A field element for each entity of the flavor. These entities represent the prover polynomials evalua...
typename Curve::ScalarField FF
ProverUnivariates< MAX_PARTIAL_RELATION_LENGTH > ExtendedEdges
A container for univariates produced during the hot loop in sumcheck.
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
ArrayOfValues< FF, RelationImpl::SUBRELATION_PARTIAL_LENGTHS > SumcheckArrayOfValuesOverSubrelations
TupleOfUnivariates< FF, RelationImpl::SUBRELATION_PARTIAL_LENGTHS > SumcheckTupleOfUnivariatesOverSubrelations
numeric::RNG & engine
BENCHMARK(execute_relation_for_univariates< UltraFlavor, ArithmeticRelation< Fr > >)
void execute_relation(::benchmark::State &state)
void execute_relation_for_values(::benchmark::State &state)
void execute_relation_for_univariates(::benchmark::State &state)
RNG & get_debug_randomness(bool reset, std::uint_fast64_t seed)
Definition engine.cpp:190
field< Bn254FrParams > fr
Definition fr.hpp:174
BENCHMARK_MAIN()
static RelationParameters get_random()