Skip to content

Commit

Permalink
Brakedown fix bench (#41)
Browse files Browse the repository at this point in the history
* fix bench call

* set num vars from 12-20
  • Loading branch information
mmagician committed Nov 13, 2023
1 parent 5bbc519 commit 61ff14a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion bench-templates/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ pub fn bench_pcs_method<
BenchmarkId::from_parameter(num_vars),
&num_vars,
|b, num_vars| {
b.iter(|| method(&ck, &vk, *num_vars, rand_poly, rand_point));
b.iter_custom(|i| {
let mut time = Duration::from_nanos(0);
for _ in 0..i {
time += method(&ck, &vk, *num_vars, rand_poly, rand_point);
}
time
});
},
);
}
Expand Down
4 changes: 2 additions & 2 deletions poly-commit/benches/brakedown_ml_times.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ fn rand_point_brakedown_ml<F: PrimeField>(num_vars: usize, rng: &mut ChaCha20Rng
(0..num_vars).map(|_| F::rand(rng)).collect()
}

const MIN_NUM_VARS: usize = 10;
const MAX_NUM_VARS: usize = 20;
const MIN_NUM_VARS: usize = 12;
const MAX_NUM_VARS: usize = 22;

bench!(
Brakedown<Fr>,
Expand Down

0 comments on commit 61ff14a

Please sign in to comment.