Closed arnaucube closed 4 years ago
Optimize Poseidon from *big.Int to goff generated finite field operations.
*big.Int
goff
Also fixes #4 and updates the Mimc7 usage of the CheckBigIntArrayInField, and updates BabyJubJub EDDSA to the new Poseidon methods.
CheckBigIntArrayInField
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 https://github.com/iden3/go-iden3-crypto/pull/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
Warning: do not merge until we check license
Optimize Poseidon from
*big.Int
togoff
generated finite field operations.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.
Before the optimizations:
With the optimizations of https://github.com/iden3/go-iden3-crypto/pull/12:
With the changes of this PR, where uses goff generated code instead of *big.Int:
Warning: do not merge until we check license