From a67172843d786d2634ea6c81e5f53218aca7305e Mon Sep 17 00:00:00 2001 From: Thomas Coratger Date: Mon, 3 Mar 2025 21:59:54 +0100 Subject: [PATCH 1/2] [sumcheck]: small fix in zerocheck_univariate_evals looping --- crates/core/src/protocols/sumcheck/prove/univariate.rs | 5 ++--- examples/Cargo.toml | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/core/src/protocols/sumcheck/prove/univariate.rs b/crates/core/src/protocols/sumcheck/prove/univariate.rs index ded982b8..203ea42f 100644 --- a/crates/core/src/protocols/sumcheck/prove/univariate.rs +++ b/crates/core/src/protocols/sumcheck/prove/univariate.rs @@ -530,8 +530,7 @@ where ); } } else { - #[allow(clippy::needless_range_loop)] - for i in 0..round_evals.len() { + for (i, round_eval) in round_evals.iter_mut().enumerate() { let mut temp = >::zero(); for j in 0..1 << packed_log_batch { @@ -553,7 +552,7 @@ where let unpacked = P::unpack_scalars(temp); for scalar in unpacked { - round_evals[i] += scalar; + *round_eval += scalar; } } } diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 07edfc0a..82ce6295 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -81,3 +81,7 @@ aes-tower = [] bail_panic = ["binius_utils/bail_panic"] fp-tower = [] rayon = ["binius_utils/rayon"] + +[profile.profiling] +inherits = "release" +debug = true From cee55a6f65bef3392059d2563b7465fcd4c4782f Mon Sep 17 00:00:00 2001 From: Thomas Coratger <60488569+tcoratger@users.noreply.github.com> Date: Mon, 3 Mar 2025 22:01:21 +0100 Subject: [PATCH 2/2] Update examples/Cargo.toml --- examples/Cargo.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 82ce6295..07edfc0a 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -81,7 +81,3 @@ aes-tower = [] bail_panic = ["binius_utils/bail_panic"] fp-tower = [] rayon = ["binius_utils/rayon"] - -[profile.profiling] -inherits = "release" -debug = true