chore(pasta): fuse AArch64 repeated squaring - #240
Closed
TalDerei wants to merge 1 commit into
Closed
Conversation
ValarDragon
approved these changes
Aug 28, 2026
Contributor
Author
|
@ValarDragon please hold off on merging, doing another review pass now. (this can merge now) well this is blocked on #222 merging anyways. I can change the base branch after that's rebased and lands. |
Contributor
Author
|
@v12sec pls review |
|
Note Complete: Audit complete. V12 did not find any issues that need review. Open the full results here. Analyzed four files, diff |
Contributor
Author
|
updated bench directly over #222.
|
TalDerei
marked this pull request as ready for review
August 28, 2026 01:14
Contributor
|
Moved to #244 to not force the x86 stack |
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 #239.
Adds a fused AArch64 assembly loop for repeated lazy squaring without a closing multiplication. This emulates #167 and does repeated lazy squarings for AArch64 (ARM64 CPUs) whereas #167 does it for X86-64 (intel AMD CPUs using BMI2/ADX assembly).
Makes 2–128-square chains 4.8–16.2% faster than #239 on Apple silicon. Single squaring is unchanged; end-to-end results were within benchmark noise.