← Lab
neonbf16
confirmedC++ · NEON / Apple M4 ProSystems, numerics & scientific librariesJuly 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.
- 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/neonbf16