You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compute_eval_table_sparse lambda and the following combination of the evaluations comprise ~12.5% of the end-to-end Spartan2 flow.
I see three primary performance bugs.
Parallelism: Currently compute_eval_table sparse is only parallel across the 3 A / B / C matrices. Most machines have more than 3 threads, thus we should increase the parallelism available.
Evaluation combination ordering. The combined_evals a + r * b + r * r * c can be inlined such that the values a / b / c are used directly after computation rather than storing, throwing away, and reloading from RAM.
r^2: During the evaluation phase should not be computed for each run of the loop. It should be computed once upfront.
https://github.com/a16z/Spartan2/blob/uniform_r1cs_shape/src/spartan/snark.rs#L238-L285
The compute_eval_table_sparse lambda and the following combination of the evaluations comprise ~12.5% of the end-to-end Spartan2 flow.
I see three primary performance bugs.
a + r * b + r * r * ccan be inlined such that the valuesa / b / care used directly after computation rather than storing, throwing away, and reloading from RAM.