Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
small_msm_matrix.bench.cpp File Reference
#include "barretenberg/common/log.hpp"
#include "barretenberg/common/thread.hpp"
#include "barretenberg/ecc/curves/bn254/bn254.hpp"
#include "barretenberg/ecc/groups/element.hpp"
#include "barretenberg/ecc/scalar_multiplication/scalar_multiplication.hpp"
#include "barretenberg/numeric/random/engine.hpp"
#include "barretenberg/srs/global_crs.hpp"
#include <algorithm>
#include <chrono>
#include <cstddef>
#include <cstdio>
#include <span>
#include <string>
#include <vector>

Go to the source code of this file.

Typedefs

using Curve = bb::curve::BN254
 Small-MSM crossover matrix benchmark.
 
using Fr = Curve::ScalarField
 
using G1 = Curve::AffineElement
 
using Element = Curve::Element
 

Functions

int main ()
 

Typedef Documentation

◆ Curve

Small-MSM crossover matrix benchmark.

Outputs a single matrix where rows = method and columns = N (number of points). Methods compared:

  • jac_fast_mt_always : pippenger_round_parallel_jacobian_fast forced maximally-multithreaded (min_pts_per_thread_override = 1).
  • jac_fast_st_always : pippenger_round_parallel_jacobian_fast forced single-threaded (min_pts_per_thread_override = SIZE_MAX).
  • small_mul_threaded : trivial_msm_threaded (bb::parallel_for split, per-worker straus or jac_fast based on slice size).
  • straus_msm : Element::straus_msm direct (single-threaded).

Two outputs are reported per (method, N):

  • Wall-clock median ns per run.
  • The MIN_JACOBIAN_SIZE crossover (single-threaded jac_fast vs straus_msm).

Build & run: cd barretenberg/cpp/build && ninja small_msm_matrix_bench ./bin/small_msm_matrix_bench

Definition at line 37 of file small_msm_matrix.bench.cpp.

◆ Element

Definition at line 40 of file small_msm_matrix.bench.cpp.

◆ Fr

Definition at line 38 of file small_msm_matrix.bench.cpp.

◆ G1

Definition at line 39 of file small_msm_matrix.bench.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 289 of file small_msm_matrix.bench.cpp.