C++26 Shipped a SIMD Library Nobody Asked For

· coding · Source ↗

TLDR

  • std::simd lands in C++26 after a decade of standardization, but compiles 10x slower, runs slower than scalar loops, and can’t express most real SIMD patterns.

Key Takeaways

  • Google Highway, SIMDe, xsimd, and EVE all outpace std::simd in production; Chromium, Firefox, and libjxl chose Highway, not std::simd.
  • std::simd has no runtime dispatch, no scalable-width SVE support, and defaults to the wrong vector width for most targets.
  • A trivial sin on a SIMD vector takes 2.2s to compile with <experimental/simd> vs 0.2s for an equivalent scalar loop in GCC 14.
  • Template error messages leak internal types like _SimdWrapper<_Float16, 8, void> – 138 lines of noise for 6 lines of user code.
  • ISPC, a separate compiler, beats all library-based SIMD approaches on control-flow-heavy workloads; EVE’s own author abandoned the committee path and still hit the same optimizer-opacity wall.

Hacker News Comment Review

  • No substantive HN discussion yet.

Notable Comments

  • @magicalhippo: Points to the satirical NoNaeAbC/std_simd repo – “six reasons to use std::simd” – as a concrete demonstration of each deficiency.

Original | Discuss on HN