diff --git a/src/provider/hyperkzg.rs b/src/provider/hyperkzg.rs index 18f9f7fa7..a77544fc5 100644 --- a/src/provider/hyperkzg.rs +++ b/src/provider/hyperkzg.rs @@ -234,10 +234,9 @@ where let mut Pi = vec![E::Fr::ZERO; Pi_len]; #[allow(clippy::needless_range_loop)] - for j in 0..Pi_len { - Pi[j] = x[ell-i-1] * polys[i][2*j + 1] // Odd part of P^(i-1) - + (E::Fr::ONE - x[ell-i-1]) * polys[i][2*j]; // Even part of P^(i-1) - } + Pi.par_iter_mut().enumerate().for_each(|(j, Pi_j)| { + *Pi_j = x[ell - i - 1] * (polys[i][2 * j + 1] - polys[i][2 * j]) + polys[i][2 * j]; + }); if i == ell - 1 && *eval != Pi[0] { return Err(NovaError::UnSat);