scipr-lab / libsnark

C++ library for zkSNARKs
Other
1.81k stars 579 forks source link

Adapt to new libff multiexp interface & use faster methods #81

Closed aleksejspopovs closed 7 years ago

aleksejspopovs commented 7 years ago

pull request 10 in libff introduces a new interface for multiexponentiation and a faster multiexponentiation algorithm, djb.

This pull request first just adapts the libsnark code to use this new interface, fixing a couple include-related bugs in the process, and then, in commit 613763680eb67f2d01344368c75048eaa7d5d8e3, switches the multiexponentiation method to the djb in the cases where we've found it to be beneficial.

Specifically, we have observed the following improvements:

(all with MULTICORE=off, USE_MIXED_ADDITION=on, on my personal machine with a Intel(R) Core(TM) i3-6100U CPU @ 2.30GHz CPU)

tromer commented 7 years ago

Looks good to me, modulo the #ifdef USE_MIXED_ADDITION comment above.