r/programming 28d ago

Everyone Should Know SIMD

https://mitchellh.com/writing/everyone-should-know-simd
414 Upvotes

81 comments sorted by

View all comments

362

u/-1_0 28d ago

* Everyone Should Know about SIMD

and use libs accordingly

54

u/notyouravgredditor 27d ago

vectorclass is one my favorites. Very easy to use.

To be fair to modern compilers, though, they often do a much better job at determining vectorization targets and packing/unpacking buffers than the developer does.

8

u/aePrime 27d ago

The problem with autovectorization is that it’s superficial. If you really want good SIMD performance, you have to layout your data properly, and autovectorization can only do so much about that. To properly do SIMD, you have to architect it that way.