3 ms·
> I thought modern languages optimized code into SIMD instructions where it could automatically... Kinda-sorta yes, but not really. Auto-vectorization is a ver
by exDM69 9y ago
> I thought modern languages optimized code into SIMD instructions where it could automatically...
Kinda-sorta yes, but not really. Auto-vectorization is a very brittle optimization that only works at the best of times and the slightest change in your code can cause it to fall out of the hot path. You have to be extra careful with aliasing and use the "restrict" keyword a lot.
If you really do care about performance, you still have to write your hot loops with explicit SIMD code.