Skip to main content
← Lab

rmsnorm

confirmedC++ · NEON / Apple M4Systems & data structuresJuly 7, 2026

the question

Is a hand-vectorized RMSNorm faster than a scalar loop, and does it cost accuracy?

what came out

Faster AND more accurate: NEON RMSNorm is ~2x the scalar f32 loop, and its 4-lane tree reduction rounds less than a sequential sum (shown to be the reduction order, not FMA). f32 accumulation error grows with hidden dim; f64 stays flat. Pre-registered, code-reviewed.

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/rmsnorm