Comment by pcwalton
8 years ago
The compiler can optimize intrinsics, though. Why shouldn't it be able to?
I agree that somewhat with AVX2 and especially with AVX-512 there's probably less reason to write intrinsics if you have a vector language. But for now SSE2, SSSE3, and SSE4 are still the bread and butter for SIMD on x86, and there are some important instructions (Fabien Giesen goes into detail at [1]) that you really have to think about how to use effectively. For example (this is mentioned at the end), all horizontal adds on x86 are awful except for PSADBW, which is really limited, as Intel designed it in a fit of myopia to target only motion estimation in contemporary codecs, and it requires you to basically design your whole algorithm around it.
[1]: https://fgiesen.wordpress.com/2016/04/03/sse-mind-the-gap/
No comments yet
Contribute on Hacker News ↗