Remove unnecessary clones of fixed columns.

This commit is contained in:
Sean Bowe 2021-03-03 09:17:00 -07:00
parent 0a6804bb30
commit fa2d0b061e
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031
1 changed files with 7 additions and 12 deletions

View File

@ -152,15 +152,10 @@ pub fn verify_proof<'params, C: CurveAffine, E: EncodedChallenge<C>, T: Transcri
.zip(lookups_evaluated.iter()) .zip(lookups_evaluated.iter())
.flat_map( .flat_map(
|(((advice_evals, instance_evals), permutations), lookups)| { |(((advice_evals, instance_evals), permutations), lookups)| {
let fixed_evals = fixed_evals.clone(); let fixed_evals = &fixed_evals;
let fixed_evals_copy = fixed_evals.clone();
let fixed_evals_copy_copy = fixed_evals.clone();
std::iter::empty() std::iter::empty()
// Evaluate the circuit using the custom gates provided // Evaluate the circuit using the custom gates provided
.chain(vk.cs.gates.iter().flat_map(move |gate| { .chain(vk.cs.gates.iter().flat_map(move |gate| {
let fixed_evals = fixed_evals.clone();
gate.polynomials().iter().map(move |poly| { gate.polynomials().iter().map(move |poly| {
poly.evaluate( poly.evaluate(
&|scalar| scalar, &|scalar| scalar,
@ -181,9 +176,9 @@ pub fn verify_proof<'params, C: CurveAffine, E: EncodedChallenge<C>, T: Transcri
p.expressions( p.expressions(
vk, vk,
argument, argument,
advice_evals, &advice_evals,
&fixed_evals_copy, &fixed_evals,
instance_evals, &instance_evals,
l_0, l_0,
beta, beta,
gamma, gamma,
@ -203,9 +198,9 @@ pub fn verify_proof<'params, C: CurveAffine, E: EncodedChallenge<C>, T: Transcri
theta, theta,
beta, beta,
gamma, gamma,
advice_evals, &advice_evals,
&fixed_evals_copy_copy, &fixed_evals,
instance_evals, &instance_evals,
) )
}) })
.into_iter(), .into_iter(),