From ce436339116b65bd5376050fd913aed656abe83e Mon Sep 17 00:00:00 2001 From: mmagician Date: Fri, 10 Nov 2023 20:38:26 +0100 Subject: [PATCH 1/2] fix bench call --- bench-templates/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bench-templates/src/lib.rs b/bench-templates/src/lib.rs index 92dbd07e..9500eb9c 100644 --- a/bench-templates/src/lib.rs +++ b/bench-templates/src/lib.rs @@ -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 + }); }, ); } From 3385b2d5abd72608b4b423169bb5c62cb40cc156 Mon Sep 17 00:00:00 2001 From: mmagician Date: Fri, 10 Nov 2023 20:49:27 +0100 Subject: [PATCH 2/2] set num vars from 12-20 --- poly-commit/benches/ligero_ml_times.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poly-commit/benches/ligero_ml_times.rs b/poly-commit/benches/ligero_ml_times.rs index c59b688a..cf723704 100644 --- a/poly-commit/benches/ligero_ml_times.rs +++ b/poly-commit/benches/ligero_ml_times.rs @@ -52,7 +52,7 @@ fn rand_point_ligero_ml(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!(Ligero, rand_poly_ligero_ml, rand_point_ligero_ml);