Skip to main content
← Lab

neonrope

mixedC++ · NEON / Apple M4 ProSystems, numerics & scientific librariesJuly 7, 2026

the question

Where does the cost of applying RoPE live on Apple-silicon NEON?

what came out

Precomputing the sin/cos angles is a ~66x kernel lever and the only one that matters; hand-vectorizing buys nothing (the compiler auto-vectorizes and it's load-bound); and RoPE is under 0.01% of a decode step anyway. Pre-registered, one prediction falsified.

method & receipts

  • Result: mixed
  • 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/neonrope