Skip to content

Commit

Permalink
IVC Coprocessor Benchmarks (#640)
Browse files Browse the repository at this point in the history
* --wip--

* --wip--

* --wip--

* add small code example, make bits match

* example and bench

* add benchmarks

* cargo fmt

* cargo fmt

* add comments

* move to tracing

* cargo fmt :(

* put more emphasis on batch sizes

* batch_size from arity -> iterations

* cargo fmt

---------

Co-authored-by: porcuquine <[email protected]>
  • Loading branch information
winston-h-zhang and porcuquine authored Sep 1, 2023
1 parent 612e54d commit f422e6c
Show file tree
Hide file tree
Showing 4 changed files with 642 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ harness = false
name = "synthesis"
harness = false

[[bench]]
name = "sha256_ivc"
harness = false

[[bench]]
name = "public_params"
harness = false
Expand Down
10 changes: 7 additions & 3 deletions benches/fibonacci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,16 @@ fn fibo_prove<M: measurement::Measurement>(
c.bench_with_input(
BenchmarkId::new(prove_params.name(), fib_n),
&prove_params,
|b, _prove_params| {
|b, prove_params| {
let mut store = Store::default();

let env = empty_sym_env(&store);
let ptr = fib::<pasta_curves::Fq>(&mut store, state.clone(), black_box(fib_n as u64));
let prover = NovaProver::new(reduction_count, lang_pallas.clone());
let ptr = fib::<pasta_curves::Fq>(
&mut store,
state.clone(),
black_box(prove_params.fib_n as u64),
);
let prover = NovaProver::new(prove_params.reduction_count, lang_pallas.clone());

let frames = &prover
.get_evaluation_frames(ptr, env, &mut store, limit, &lang_pallas)
Expand Down
Loading

0 comments on commit f422e6c

Please sign in to comment.