Skip to main content
← Lab

neonrmsnorm

confirmedC++ · NEON / Apple M4 ProSystems, numerics & scientific librariesJuly 9, 2026

the question

Where exactly does the speedup in a hand-vectorized RMSNorm come from?

what came out

Entirely the sum-of-squares reduction's 4-wide vector accumulator. asm confirms the compiler won't reassociate an FP reduction at either precision, so NEON beats a float-accumulator scalar 2.5-3x. ~2x overall; rsqrt is free via 2 Newton steps.

method & receipts

  • Result: confirmed
  • Pre-registered: the prediction was written down and committed before the run.
  • Reproducible: one script re-runs the whole thing from scratch.
  • Adversarial self-review: my own skeptic's pass over each claim, kept in the repo.
  • Machine-readable claims: every reported number, in a checkable file.
  • Tested: a correctness/benchmark suite ships alongside the code.

→ read the code and re-run it

github.com/v-code01/neonrmsnorm