-
Notifications
You must be signed in to change notification settings - Fork 41
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
Feature/poseidon opt goff #15
Conversation
Optimize Poseidon migrating from *big.Int to goff generated finite field operations. Benchmarks: Tested on a Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, with 16GB of RAM. - Before the optimizations: ``` BenchmarkPoseidon-4 470 2489678 ns/op BenchmarkPoseidonLarge-4 476 2530568 ns/op ``` - With the optimizations of #12: ``` BenchmarkPoseidon-4 766 1550013 ns/op BenchmarkPoseidonLarge-4 782 1547572 ns/op ``` - With the changes of this PR, where uses goff generated code instead of *big.Int: ``` BenchmarkPoseidon-4 9638 121651 ns/op BenchmarkPoseidonLarge-4 9781 119921 ns/op ```
4485806
to
d4c805d
Compare
The code looks good to me! Now the only remaining thing to merge this is resolve any doubt about licensing.
So I think Apache 2 would cause any problem in either the GPLv3 licensed distribution of our libraries nor a possible commercial distribution under a private license (as long as the two requirements of the Apache 2 for Goff are met). |
d4c805d
to
2a3f0d9
Compare
After internal confirmation that there are no issues with the license, will merge this PR to master. |
Optimize Poseidon migrating from
*big.Int
togoff
generated finite fieldoperations.
Also fixes #4 and updates the Mimc7 usage of the
CheckBigIntArrayInField
, and updates BabyJubJub EDDSA to the new Poseidon methods.Benchmarks:
Tested on a Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, with 16GB of RAM.
More than 10x improvement (from
1.547.572 ns/op
to119.921 ns/op
).Warning: do not merge until we check the license