Repository navigation
constraints: mv folder - #432
Merged
Merged
Conversation
tcoratger
commented
Mar 17, 2026
Comment on lines
+256
to
+259
| // Transpose the points into a k × n matrix (rows = variables, | ||
| // columns = constraint points). Uses Plonky3's transpose which | ||
| // writes directly into a flat buffer. | ||
| let points_matrix = MultilinearPoint::transpose(&self.points, false); |
Owner
Author
There was a problem hiding this comment.
@kilic Here I think that we were doing just this manually.
Comment on lines
+386
to
+396
| // Row i contains [z_1^{2^i}, z_2^{2^i}, ..., z_n^{2^i}]. | ||
| // Stored as a flat Vec<F> of size k * n in row-major order. | ||
| let mut pow_matrix = F::zero_vec(k * n); | ||
| for (j, &var) in self.vars.iter().enumerate() { | ||
| let mut v = var; | ||
| for i in 0..k { | ||
| // pow_matrix[i * n + j] = z_j^{2^i} | ||
| pow_matrix[i * n + j] = v; | ||
| v = v.square(); | ||
| } | ||
| } |
Owner
Author
There was a problem hiding this comment.
@kilic Here I think that we were doing a super heavy vec of vec allocation that can be simplified here.
Comment on lines
-367
to
-373
| // Extract the i-th column of the power matrix: [pow(z_1)[i], ..., pow(z_n)[i]] | ||
| // | ||
| // These are the values z_1^{2^i}, z_2^{2^i}, ..., z_n^{2^i}. | ||
| let bin_powers_col = bin_powers | ||
| .iter() | ||
| .map(|powers| powers[i]) | ||
| .collect::<Vec<_>>(); |
Comment on lines
+442
to
+443
| *weight_out += | ||
| dot_product::<EF, _, _>(challenges.iter().copied(), row.iter().copied()); |
Owner
Author
There was a problem hiding this comment.
@kilic Here a dot product were hidden that can be done much more efficiently with the dedicated dot_product efficient method.
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.
No description provided.