iden3 / go-circom-prover-verifier

Go implementation of the Groth16 zkSNARK Prover and Verifier compatible with Circom
GNU General Public License v3.0
38 stars 13 forks source link

Implement more agressive parallelism #7

Closed ed255 closed 4 years ago

ed255 commented 4 years ago

After a profile analysis I have observed that GenerateProof spends most of its time in two parts:

This PR implements a full parallel approach for the two loops using all the CPUs available. The computation is first equally split into go routines and then joined.

Here are the benchmark results on my laptop (Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz), for generating a proof of 5k constraints:

arnaucube commented 4 years ago

Great!! :smile: