← Lab
neonbf16
confirmedC++ · NEON / Apple M4Systems & data structuresJuly 9, 2026
the question
f32->bf16: is round-to-nearest better than truncation, and is a hand-written NEON kernel worth it?
what came out
Round-to-nearest-even is exactly one bit more accurate than truncation (max rel error <=2^-8 vs <=2^-7) and free. But hand-writing a NEON kernel buys nothing (0.97-1.02x) -- the compiler already auto-vectorizes the bit-twiddle. Hand-SIMD only pays against an auto-vectorization barrier. asm-confirmed.
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.
→ read the code and re-run it
github.com/v-code01/neonbf16