refactor: Integrate zip_with macro (Arecibo backport)#292
Merged
srinathsetty merged 1 commit intomicrosoft:mainfrom Jan 10, 2024
Merged
refactor: Integrate zip_with macro (Arecibo backport)#292srinathsetty merged 1 commit intomicrosoft:mainfrom
srinathsetty merged 1 commit intomicrosoft:mainfrom
Conversation
- Created a new file `macros.rs` with the implementation of `zip_with` and `zip_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` and `batch_eval_verify` in `snark.rs`, methods inside `PolyEvalWitness` and `PolyEvalInstance` in `mod.rs`, and multiple functions in `multilinear.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` and `eq.rs` files. This backports (among others) content from the following Arecibo PRS: - lurk-lang/arecibo#149 - lurk-lang/arecibo#158 - lurk-lang/arecibo#169 Co-authored-by: porcuquine <porcuquine@users.noreply.github.com>
huitseeker
added a commit
to huitseeker/Nova
that referenced
this pull request
Feb 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.rswith the implementation ofzip_withandzip_with_for_eachmacros 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_proveandbatch_eval_verifyinsnark.rs, methods insidePolyEvalWitnessandPolyEvalInstanceinmod.rs, and multiple functions inmultilinear.rsthrough 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.rsandeq.rsfiles.This backports (among others) content from the following Arecibo PRS:
This supports the upcoming integration of #283