Optimize dense q1 row dot products#208
Open
Kuhai9801 wants to merge 4 commits into
Open
Conversation
4 tasks
# Conflicts: # protocol/src/lib.rs # zip-plus/benches/zip_common.rs # zip-plus/src/pcs/phase_prove.rs # zip-plus/src/pcs/test_utils.rs
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.
🚀 What’s this PR do?
Refs #134.
This replaces #201. That PR only helped the Boolean/one-hot equality-table case, while the normal PCS path uses transcript-random dense
q_1.This PR optimizes the prover-side
b_j = <poly_comb_r[j], q_1>computation inZipPlus::prove_ffor denseq_1. It preparesq_1once in Montgomery form and avoids the full field conversion for everyCombRcoefficient, while preserving the existing field-lift result and transcript layout.📎 Related issues
Refs #134
🧠 Context
The scope is the prover
prove_frow-dot-product hotspot from #134. This does not claim to optimize the verifier TODO path.Benchmarked in Codespace on AMD EPYC 7763,
rustc 1.96.0, base4454d6c.BPoly<63>batch 12^1633.650 ms22.667 ms-32.64%BPoly<63>batch 22^1667.430 ms45.548 ms-32.45%BPoly<63>batch 52^16173.300 ms117.600 ms-32.14%BPoly<63>batch 12^134.5424 ms3.4673 ms-23.67%✅ Checklist
feature/<name>