chore(pasta): lazy point x86-64 assembly experiment - #237
Draft
TalDerei wants to merge 3 commits into
Draft
Conversation
* Share the portable Pasta field squaring primitive Move the identical pure-Rust wide-squaring routine used by Fp and Fq into a private limb-array helper. Each field retains its existing Montgomery reduction and all other arithmetic paths. * Use the low-half squaring reduction on x86-64 Cancel the low half of portable square products before adding the high half, matching the dependency shape of the Apple assembly implementation. Select this path only on x86-64; other architectures retain their existing classical reduction, and multiplication is untouched. * Skip corrections within portable squaring chains Keep portable repeated-squaring accumulators below twice the field modulus and canonicalize only at the end of a chain. Specialize the x86-64 lazy reducer for the shared Pasta modulus shape, while retaining the Apple AArch64 assembly paths.
This file contains hidden or 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
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.
Stacks on #222.
Adds lazy x86-64 Pasta point arithmetic: additions improve 0.5–1.7%, but doubling slows 4–5%, scalar multiplication 1%, and GLV 2.2–2.4%.