-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bb): towards reduced polynomial memory usage (#7990)
See https://hackmd.io/MDcSYZtESay9rI6-Atd0fg for motivation Another pass on moving polynomials to a form where 'islands' of non-zeroes are supported. - introduce a new form of shifts: we start unshifted polynomials at start_index() == 1 and for shifted polynomials simply shallow copy them with start_index() == 0. Note more non-trivial copying of polynomials (heard whispering of this with AVM, or perhaps if we had prover-builder sharing) would need more flexibility in the array backing - ensure shifted polynomials are allocated as above - change operator[] to be .at() everywhere, which is arbitrarily chosen to be the mutable operator. This is to keep operator[] able to read outside of strictly-defined bounds as before. For any mutable accesses, we use at(). - adapt the code to the new shift scheme, this took the majority of the time - try out the new abbreviated scheme with - PolynomialSpan now replaces std::span in a few cases, namely in computing commitments. This includes a start index offset. When computing MSMs this is natural as we just offset the SRS index (representing the exponent) by start_index, which follows as conceptually we have 0 values before start_index. --------- Co-authored-by: ludamad <[email protected]>
- Loading branch information
Showing
82 changed files
with
2,217 additions
and
1,575 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.