refactor: Integrate zip_with macro (Arecibo backport) #292
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created a new file
macros.rs
with the implementation ofzip_with
andzip_with_for_each
macros providing syntactic sugar for zipWith patterns.zipWith patterns implemented through the use of the zip_with! macros now resolve to the use of zip_eq, a variant of zip that panics when the iterator arguments are of different length,
the zip_eq implementation is the native rayon one for parallel iterators, and the one from itertools (see below) for the sequential ones,
Optimized and refactored functions like
batch_eval_prove
andbatch_eval_verify
insnark.rs
, methods insidePolyEvalWitness
andPolyEvalInstance
inmod.rs
, and multiple functions inmultilinear.rs
through the use of implemented macros.Introduced the use of itertools::Itertools in various files to import the use of zip_eq on sequential iterators.
Made use of the Itertools library for refactoring and optimizing computation in
sumcheck.rs
andeq.rs
files.This backports (among others) content from the following Arecibo PRS:
This supports the upcoming integration of #283