Optimize dense q1 row dot products#201
Conversation
|
Hey @Kuhai9801, I think q_0 and q_1 will almost never be Boolean, since they contain values of the form eq(boolean_vector, random_vector), right? If that is the case then it is better to not include this optimization |
|
You're right. This shortcut only triggers when the original evaluation point slice is Boolean, making the equality table one-hot. In the full protocol the PCS point is r_0 from the multipoint sumcheck, plus folding challenges for the binary PCS, so it is transcript-random and q_0/q_1 are dense with overwhelming probability. That means this PR does not address #134's arbitrary-q_1 Montgomery-reduction hotspot. I'll close or rework this toward the integer-space dot-product approach from #134 unless there is a direct PCS Boolean-opening workload we want to support. |
59a92bd to
a1d71dc
Compare
|
Why was the PR closed? |
|
Hi! Created a new one here: #208 |
🚀 What’s this PR do?
Refs #134.
Optimizes dense
q_1row dot products inZipPlus::prove_f. The prover still computes the sameb_j = <poly_comb_r[j], q_1>values and keeps the transcript layout unchanged, but avoids a full Montgomery conversion for everyCombRcoefficient.📎 Related issues
Refs #134
🧠 Context
q_1is prepared once, and signed integer coefficients are reduced into raw Montgomery limbs before multiplication. This preserves the existing field-lift result while removing the hot-loop conversion cost.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>