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
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 of pTSizes, bitChunkSize, and nChunks would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
luluzhou1
changed the title
Calculation of chunkSize Results in Suboptimal Parallelism in Multiexp Engine?
Why is chunkSize set in this way?
May 6, 2024
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: