C++26 Shipped a SIMD Library Nobody Asked For

18 points by colejohnson66


Lilian

Here is the SG6 Chair's response to the referenced "6 reasons to use std::simd" critique. https://www.reddit.com/r/cpp/s/QIC0FC0sGN

foonathan

I can't speak to the criticism in detail, but the author tests <experimental/simd> which is the experimental technical specification from years ago and not what was actually standardized in C++26.

tomsmeding

The post makes this point about 6 times:

No optimizer integration. The compiler sees template instantiations and function calls, not SIMD primitives.

Why? The assembly fragments shown contain no function calls, just vector instructions, so clearly at some point in the compilation process the calls got inlined and they became SIMD primitives. Why can't that happen early? Is this a result of compilers having a fixed order they perform optimisatipns in, and the algebraic ones are before inlining? That sounds weird to me. What am I missing?