-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to using rayon exclusively #21
Comments
PS @ebfull, did you have any notes on why Rayon was slower? In Zexe we switched to using only |
I don't know about bellman, but in a very early version of Bulletproofs we tried using Rayon for the parallel parts of the inner product proof and got minimal speedup even for a very parallel task. I don't think we dug super far into it but from perf counters it seemed that it was doing a ton of context switches. Perhaps the work-stealing has more overhead than expected? |
Hmm how large were those inner product proofs? Perhaps on small instance sizes the overhead is too large? In our case, an MSM over large inputs does noticeably speed up when parallelized, but is still slower than Moreover, |
I don't remember the size but I believe the timings were in the range of 1-20 ms. |
OK so I did some investigation, and came up with the following hypothesis: using futures_cpupool in the Groth16 prover gives better performance than using To justify this hypothesis, I performed the following test: I modified the |
Edwards scalar multiplication inside the circuit
Right now we use
futures-cpupool
for one purpose (work stealing) andcrossbeam
for another (scoped threads). I can get both of these withrayon
, which is also more mature, but in the past when I switched to rayon it was slower.I think there are tweaks and new features in its API which would allow me to adopt it entirely.
The text was updated successfully, but these errors were encountered: