9#include <benchmark/benchmark.h>
12using namespace benchmark;
16void asm_add_with_coarse_reduction(State& state)
noexcept
19 for (
auto _ : state) {
20 DoNotOptimize(fr::asm_add_with_coarse_reduction(x, y));
25void asm_conditional_negate(State& state)
noexcept
28 for (
auto _ : state) {
29 fr::asm_conditional_negate(x,
true);
34void asm_mul_with_coarse_reduction(State& state)
noexcept
37 for (
auto _ : state) {
38 DoNotOptimize(fr::asm_mul_with_coarse_reduction(x, y));
43void asm_reduce_once(State& state)
noexcept
46 for (
auto _ : state) {
47 DoNotOptimize(fr::asm_reduce_once(x));
52void asm_self_add_with_coarse_reduction(State& state)
noexcept
55 for (
auto _ : state) {
56 fr::asm_self_add_with_coarse_reduction(x, y);
59BENCHMARK(asm_self_add_with_coarse_reduction);
61void asm_self_mul_with_coarse_reduction(State& state)
noexcept
64 for (
auto _ : state) {
65 fr::asm_self_mul_with_coarse_reduction(x, y);
68BENCHMARK(asm_self_mul_with_coarse_reduction);
70void asm_self_reduce_once(State& state)
noexcept
73 for (
auto _ : state) {
74 fr::asm_self_reduce_once(x);
79void asm_self_sqr_with_coarse_reduction(State& state)
noexcept
82 for (
auto _ : state) {
83 fr::asm_self_sqr_with_coarse_reduction(x);
86BENCHMARK(asm_self_sqr_with_coarse_reduction);
88void asm_self_sub_with_coarse_reduction(State& state)
noexcept
91 for (
auto _ : state) {
92 fr::asm_self_sub_with_coarse_reduction(x, y);
95BENCHMARK(asm_self_sub_with_coarse_reduction);
97void asm_sqr_with_coarse_reduction(State& state)
noexcept
100 for (
auto _ : state) {
101 DoNotOptimize(fr::asm_sqr_with_coarse_reduction(x));
106void mul(State& state)
noexcept
109 for (
auto _ : state) {
110 DoNotOptimize(x * y);
115void self_mul(State& state)
noexcept
118 for (
auto _ : state) {
124void add(State& state)
noexcept
127 for (
auto _ : state) {
128 DoNotOptimize(x + y);
133void self_add(State& state)
noexcept
136 for (
auto _ : state) {
142void sub(State& state)
noexcept
145 for (
auto _ : state) {
146 DoNotOptimize(x - y);
151void self_sub(State& state)
noexcept
154 for (
auto _ : state) {
160void invert(State& state)
noexcept
163 for (
auto _ : state) {
164 DoNotOptimize(x.
invert());
169void self_neg(State& state)
noexcept
172 for (
auto _ : state) {
178void self_reduce_once(State& state)
noexcept
181 for (
auto _ : state) {
187void self_to_montgomery_form(State& state)
noexcept
190 for (
auto _ : state) {
196void self_sqr(State& state)
noexcept
199 for (
auto _ : state) {
205void sqr(State& state)
noexcept
208 for (
auto _ : state) {
209 DoNotOptimize(x.
sqr());
Entry point for Barretenberg command-line interface.
BENCHMARK(vector_of_evaluations) -> DenseRange(15, 21) ->Unit(kMillisecond) ->Iterations(1)
BB_INLINE constexpr void self_reduce_once() &noexcept
BB_INLINE constexpr void self_sqr() &noexcept
constexpr field invert() const noexcept
BB_INLINE constexpr void self_neg() &noexcept
BB_INLINE constexpr field sqr() const noexcept
BB_INLINE constexpr void self_to_montgomery_form() &noexcept