Use batch inversion to compute the quoients for Z (#136)

Shaves about a second off the recursive proof time! Down to 2.45s on my laptop.
This commit is contained in:
Daniel Lubarov 2021-07-30 09:02:56 -07:00 committed by GitHub
parent 018fb005f8
commit bb316fb146
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,8 +148,9 @@ pub(crate) fn eval_vanishing_poly_base<F: Extendable<D>, const D: usize>(
wire_value + betas[i] * s_sigma + gammas[i]
})
.collect::<Vec<_>>();
let denominator_inverses = F::batch_multiplicative_inverse(&denominator_values);
let quotient_values = (0..common_data.config.num_routed_wires)
.map(|j| numerator_values[j] / denominator_values[j])
.map(|j| numerator_values[j] * denominator_inverses[j])
.collect::<Vec<_>>();
// The partial products considered for this iteration of `i`.