-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds two new methods `commit_structured` and `commit_structured_with_nonzero_complement` designed to commit to wires and the permutation grand product, respectively. The first handles polynomials with islands of non-zero values by simply copying the nonzero inputs into contiguous memory using the known endpoints then using the conventional `commit` method. The second assumes blocks of arbitrary values interspersed with blocks of constant values (with the constant differing between blocks), i.e. the form of z_perm in the structured trace setting. This method uses `commit_structured` to compute the contribution from the non-constant regions. The constant region contribution is computed by first summing all points sharing a scalar using batched affine addition (implemented in new class `BatchedAfffineAddition`), then performing the MSM on the reduced result with one mul per constant scalar. Note: The core affine addition logic used herein was adapted from my earlier work on the `MsmSorter` which had additional logic for sorting polynomials to arrange them in sequences to be added (but was not multithreaded). There turns out not to be a use case for this, at least for now. I've created an issue to either refactor that method to use the new and improved logic in `BatchedAfffineAddition` or to simply delete it. The relevant before and after number for ClientIvc (total savings ~1.7s): ``` ClientIVCBench/Full/6 33537 ms COMMIT::wires(t) 2217 43.65% COMMIT::z_perm(t) 2304 45.36% ``` ``` ClientIVCBench/Full/6 31802 ms COMMIT::wires(t) 1720 51.07% COMMIT::z_perm(t) 1090 32.37% ```
- Loading branch information
1 parent
4c1163a
commit 26f406b
Showing
13 changed files
with
860 additions
and
17 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
Oops, something went wrong.