Skip to content

chore(pasta): fuse AArch64 repeated squaring - #240

Closed
TalDerei wants to merge 1 commit into
pasta-x86-64-asm-rebasedfrom
pasta-aarch64-lazy-squaring
Closed

chore(pasta): fuse AArch64 repeated squaring#240
TalDerei wants to merge 1 commit into
pasta-x86-64-asm-rebasedfrom
pasta-aarch64-lazy-squaring

Conversation

@TalDerei

@TalDerei TalDerei commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

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.


Screenshot 2026-08-27 at 3 32 07 PM Screenshot 2026-08-27 at 3 38 02 PM Screenshot 2026-08-27 at 4 06 05 PM

@TalDerei TalDerei self-assigned this Aug 27, 2026
@TalDerei

TalDerei commented Aug 28, 2026

Copy link
Copy Markdown
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.

@TalDerei

Copy link
Copy Markdown
Contributor Author

@v12sec pls review

@v12-auditor

v12-auditor Bot commented Aug 28, 2026

Copy link
Copy Markdown

Note

Complete: Audit complete. V12 did not find any issues that need review.

Open the full results here.

Analyzed four files, diff 8d7e900...fce9040.

@TalDerei

Copy link
Copy Markdown
Contributor Author

updated bench directly over #222.

Screenshot 2026-08-27 at 6 08 08 PM

@TalDerei
TalDerei marked this pull request as ready for review August 28, 2026 01:14
@ValarDragon

Copy link
Copy Markdown
Contributor

Moved to #244 to not force the x86 stack

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