3 ms·
Correct. There are still some situations that benefit from it, but only using the extended instruction sets that compilers can't/won't generate. Even then you s
by pjc50 7mo ago
Correct. There are still some situations that benefit from it, but only using the extended instruction sets that compilers can't/won't generate. Even then you should at least try writing the C code and seeing if it will auto-vectorize. Even C# can auto-vectorize some cases now.
Things like "add with saturation" and the special AES instructions.
- jesse__ 7mo agoIn my experience, relying on the compiler to auto vectorize your code is a path fraught with peril. It'll break eventually. If it matters, write the simd yourself. It'll probably be 2-50x better than the compiler anyways.