-
Notifications
You must be signed in to change notification settings - Fork 162
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
Optimize the Final exponentiation #75
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[WIP] because AMD behaves differently than Intel with assembly.. We might go back to a pure Go inverse version or implement Pornin's inverse (in pure Go). |
With asm-inverse removed (on AWS z1d.large):
|
N.B.: The current tradeoff of (inverse cost / series of 0's size) allows only BLS24-315 to benefit from the Montgomery |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#74
[WIP][Ready to merge]This PR, implements Karabina's compressed cyclotomic squaring and decompression.
It also merges @gbotrel work onF_p
inverse.The trick of mixing the GS and Karabina cyclotomic squares in
Expt()
combined with the new inverse yields speedups in the final exponentiation for BLS12-377, BLS12-381 and BLS24-315 but not BW6-761 and BW6-633.s=46
--> 14% speedups=32
--> 6% speedups=20
-->12% speedup[edit] 14% speedup with Montgomery batch inverseN.B. For BLS12-381, there another series of 15 0's but it's not worth doing it with Karabina. If we manage to make the inverse even faster (e.g. Pornin with assembly), then it might lead to some speedup with a Montgomery batch inverse.