Everyone Should Know SIMD.
Mitchell Hashimoto (22 July 2026)🔗 https://mitchellh.com/writing/everyone-should-know-simd
⚓ #performance #bcs1450 #bcs2220 #bcs
SIMD has a reputation for being complex. […] I think that’s wrong. SIMD can be simple to understand, and common “process N values at a time” SIMD code to speed up a naive for loop almost always follows the same general shape. Once you learn the basics, writing SIMD is just about as easy as a for loop.
Exercise for PL people: Why is the level of discourse so low here? What prevents the language (here, Zig) from including loops like this in their standard libraries? How does APL do it? (Hint: end←(codepoints>15)⍳0. How does the APL solution differ in terms of vectorizability? In terms of big-O complexity? How could that be addressed?)
