After a profile analysis I have observed that GenerateProof spends most of its time in two parts:
first loop: 82%
second loop: 15%
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:
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:
master
: 3.024627965sfeature/paralelism2
: 933.58549ms