-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pippenger for G1 scalar_mul (single-threaded), add_mixed optimisation #81
Comments
At some point the Edwards "Jubjub" curves could benefit form Pippenger too, although maybe that code should be modeled on dalek or something, not sure. |
All elliptic curves in Zexe already work with the pippenger-based MSM! |
We've no reason to finish this before moving to ZEXE https://github.com/scipr-lab/zexe/issues/165#issuecomment-609440483
Hmm @jon-chuang do you know what the difference between the two algorithms was? I believe |
Well certainly with w-NAF and GLV we've achieved the desired speedup for scalar mul and more. The only remaining question is for the mixed add. Wrt your question, I don't know. |
AFAIU, gnark has a lower finite field multiplication time than arkworks, due to the optimization to montgomery reduction they describe in this article: https://hackmd.io/@zkteam/modular_multiplication#Implementation. Their speedup was 65ns -> 50ns per multiplication, which looks roughly like the speedup for (Perhaps theres a separate algorithmic speedup there as well) |
This is incorrect, the above discrepancies were even after the equivalent alg was implemented. In fact, our assembly montgomery mul is faster. Anw, I'm closing, as these comments are imo based on old data and not worth digging up. If someone wants to bench carefully and find areas for improvements please do so anew. |
In order to match gnark timings for G1, we should bring
mul_assign
timings down to 220us from 270us.add_mixed
should be brought down from 750us to 705us.gnark uses the following algorithm credited to Jonathan Bootle: https://jbootle.github.io/Misc/pippenger.pdf.
The text was updated successfully, but these errors were encountered: