Add edge case handling for batch_add#169
Conversation
05c4179 to
b2671ef
Compare
a8c0e45 to
a5a18fe
Compare
|
Wait for #168 to be merged. |
guorong009
left a comment
There was a problem hiding this comment.
Overall, I think the PR looks good.
I have 2 comments.
- Is there any use case of
batch_add_nonexceptional?
I think we can get rid of this function if not used.
It will reduce the code.
Also, we can keep the original name -batch_add, just add the missing logic. - How about
multiexp_serial/multiexp_parallel, instead ofserial_multiexp/parallel_multiexp?
I just believe thatmultiexp_*is more meaningful than*_multiexp.
guorong009
left a comment
There was a problem hiding this comment.
Regarding the naming, I think we should use msm, instead of multiexp.
Since we are handling the EC points and scalars.
|
I'm still on the fence about the naming.
We could have |
524a5ba to
806f47e
Compare
Yes, I believe they are better. |
806f47e to
6ede410
Compare
* feat: add edge case handling for batch_add * feat: handle edge cases in msm + rename functions * chore: generate test points in parallel * chore: remove redundant cfg * refactor: rename msm functions * chore: remove batch_add w/o edge case handling * fix: clippy * fix: leftover comment
* feat: add edge case handling for batch_add * feat: handle edge cases in msm + rename functions * chore: generate test points in parallel * chore: remove redundant cfg * refactor: rename msm functions * chore: remove batch_add w/o edge case handling * fix: clippy * fix: leftover comment
This PR adds a new version of
batch_addthat accounts for edge cases. (Closes #153)The old function is now
batch_add_nonexceptional( as suggested #130 (comment))The new version is
batch_add_exceptionalThe decrease in performance after the change is minimal:
The msm functions have been renamed:
multiexp_serial->serial_multiexpbest_multiexp->parallel_multiexpbest_multiexp_indepenedent_points->best_multiexpI still think this names are quite confusing, so suggestions are welcome. ( Maybe
cyclone_instead ofbest_andmsminstead ofmultiexp).The old
batch_addhas been kept but is now unsused. We can either remove it, or add another msm or argument tobest_multiexpthat enables its use.