← Lab
neonrope
mixedC++ · NEON / Apple M4Systems & data structuresJuly 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, independently verified.
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.
- 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/neonrope