Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Integrate zip_with macro (Arecibo backport) #292

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

huitseeker
Copy link
Contributor

  • 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:

This supports the upcoming integration of #283

- 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 <[email protected]>
@srinathsetty srinathsetty merged commit 48887f8 into microsoft:main Jan 10, 2024
6 checks passed
huitseeker added a commit to huitseeker/Nova that referenced this pull request Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants