Adapt to new libff multiexp interface & use faster methods #81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 6137636, 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:
the prover in
./libsnark/profile_ram_ppzksnark 32 16 100 10 300
(a sample TinyRAM ppzkSNARK, which is reduced to a R1CS with 999788 constraints and 745726 variables) runs 25% fasterthe prover in
./libsnark/profile_uscs_ppzksnark 1000000 20
(1000000 constraints, 20 variables) runs 53% fasterthe prover in
./libsnark/profile_r1cs_gg_ppzksnark 1000000 700000
(1000000 constraints, 700000 variables) runs 33% faster(all with
MULTICORE=off
,USE_MIXED_ADDITION=on
, on my personal machine with aIntel(R) Core(TM) i3-6100U CPU @ 2.30GHz
CPU)