diff --git a/bench-templates/src/lib.rs b/bench-templates/src/lib.rs index 31f78931..552f5924 100644 --- a/bench-templates/src/lib.rs +++ b/bench-templates/src/lib.rs @@ -46,7 +46,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 + }); }, ); } diff --git a/poly-commit/benches/hyrax_times.rs b/poly-commit/benches/hyrax_times.rs index 60c5a057..7f579cab 100644 --- a/poly-commit/benches/hyrax_times.rs +++ b/poly-commit/benches/hyrax_times.rs @@ -21,7 +21,7 @@ fn rand_point_hyrax(num_vars: usize, rng: &mut ChaCha20Rng) -> Ve (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!(Hyrax254, rand_poly_hyrax, rand_point_hyrax);