Skip to content
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

Improve projective mul by scalar perf #553

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

tcoratger
Copy link
Collaborator

During the multiplication of a projective point by a scalar, the leading zeros can be skipped in the loop, because they induce unnecessary doubling calculations, giving always the identity value back before the first non zero element is reached in the rhs boolean array.

Skipping this useless calculations can reduce drastically the calculation costs, especially for small numbers (for example, is our scalar is 1, then 255 useless doubling are performed).

@xJonathanLEI
Copy link
Owner

Rebasing on master for CI.

Copy link
Owner

@xJonathanLEI xJonathanLEI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xJonathanLEI xJonathanLEI merged commit 5952ac9 into xJonathanLEI:master Mar 27, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants