-
Notifications
You must be signed in to change notification settings - Fork 56
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
Why is chunkSize set in this way? #160
Comments
luluzhou1
changed the title
Calculation of chunkSize Results in Suboptimal Parallelism in Multiexp Engine?
Why is chunkSize set in this way?
May 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue
In src/engine_multiexp.js line 127-137,
If I understand correctly, the purpose here is to execute the _multiExpChunk function in parallel. However, I cannot understand why
chunkSize
is set like this:chunkSize = Math.floor(nPoints / (tm.concurrency /nChunks));
(line 122).For instance, in one proof generation where
tm.concurrency = 10, nChunks = 18, and nPoints = 1020160
, the resulting chunkSize is 1836288, which is greater than nPoints, leading to opPromises containing only one element.Possible solution:
change line 122 to
chunkSize = Math.floor(nPoints / (tm.concurrency * nChunks));
After the change, the time spent on Multiexp has been reduced to approximately 80% of the original runtime.
I'm not entirely sure if this is the best solution, as I do not fully understand the meaning of
nChunks
. Any explanation of the meanings ofpTSizes
,bitChunkSize
, andnChunks
would be greatly appreciated.The text was updated successfully, but these errors were encountered: