Skip to main content
← Lab

neonrmsnorm

confirmedC++ · NEON / Apple M4Systems & data structuresJuly 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. Independently verified.

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.
  • Independently reviewed an adversarial review pass, 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