Live data from Hacker News

Everyone should know SIMD

mitchellh.com

171–180 of 263 posts

Re: Everyone should know SIMD

#171
I think an even better advice is that everyone should know array programming, because you generally need that mindset for SIMD optimizations as (packed) SIMD-specific techniques are surprisingly rare. And array programming gives you a generally performant code even without SIMD because it is much easier to auto-vectorize.

Re: Everyone should know SIMD

#173

Earlier quoted context omitted.

It's a great talk, I just wish there was a good focused textual version of it, as it is a very long video to recommend to others. Very worth it, but a big investment. It's a great example of what I think of as vertical integration for performance. As you go through the talk you can understand why all these abstractions exist and why they have to be so generic. But when you have a specific use case, you can vertically…

Be the change you want to see. Post a transcript on your own website.

Doesn't YouTube provide one automatically?

Re: Everyone should know SIMD

#174
post #107

Earlier quoted context omitted.

It seems like such a tempting gap though. The sort of thing you’d think in 2015 would be an obvious capability of 2026 languages!

The 2015 people didn't take into account the high stress levels in 2026. We're all struggling to pay for groceries and rent.

I think I am missing the joke here. Who exactly is worse off than 11 years ago?

Re: Everyone should know SIMD

#175

I think an even better advice is that everyone should know array programming, because you generally need that mindset for SIMD optimizations as (packed) SIMD-specific techniques are surprisingly rare. And array programming gives you a generally performant code even without SIMD because it is much easier to auto-vectorize.

I'm no fan of closed-source languages, and lord knows MATLAB has its warts. But I can't deny that it was pretty seamless to write efficient vectorised code for numerical simulations at uni. I don't have much experience with it, but my understanding is that Julia is the closest thing to a more modern and expressive language that has similar vectorisation capabilities.

Re: Everyone should know SIMD

#176
post #175

I think an even better advice is that everyone should know array programming, because you generally need that mindset for SIMD optimizations as (packed) SIMD-specific techniques are surprisingly rare. And array programming gives you a generally performant code even without SIMD because it is much easier to auto-vectorize.

I'm no fan of closed-source languages, and lord knows MATLAB has its warts. But I can't deny that it was pretty seamless to write efficient vectorised code for numerical simulations at uni. I don't have much experience with it, but my understanding is that Julia is the closest thing to a more modern and expressive language that has similar vectorisation capabilities.

R and Numpy are also pretty good at this (and Julia was inspired by both of these and Matlab).

In fact, I'm reasonably certain that R (known as S in the 70's) was the first real language designed around this concept.

Re: Everyone should know SIMD

#177
post #118

Good article! I just wouldn't start off with bold sentences as > SIMD can be simple to understand and > writing SIMD is just about as easy as a for loop and then the first example requires 12 lines to replace one line of scalar code. Be honest and say SIMD is hard but the results are worth it! (Another nitpick: if this article is for newbies, don't use SIMD-only words and concpts before explaining them. Step 5 is goo…

This is probably one of the biggest sins in technological teaching. Sure it is crucially important to take away the fear of a topic. But you don't do so by saying it is simple, you do so by showing it is simple. And it turns out sometimes you cannot show it is simple, because it is in fact very complex. But every complex topic is made up of smaller, simpler ones. Good teachers then manage to find a good order of thos…

Yep, I avoid saying the word simple almost entirely - its straight forward to get to the top of a mountain, it might still be incredibly arduous.

Re: Everyone should know SIMD

#178
post #174

Earlier quoted context omitted.

The 2015 people didn't take into account the high stress levels in 2026. We're all struggling to pay for groceries and rent.

I think I am missing the joke here. Who exactly is worse off than 11 years ago?

Pretty much everyone except the ultra wealthy.

It was bad 11 years ago. It's worse now.

Re: Everyone should know SIMD

#180

Good article! I just wouldn't start off with bold sentences as > SIMD can be simple to understand and > writing SIMD is just about as easy as a for loop and then the first example requires 12 lines to replace one line of scalar code. Be honest and say SIMD is hard but the results are worth it! (Another nitpick: if this article is for newbies, don't use SIMD-only words and concpts before explaining them. Step 5 is goo…

It's not a nitpick. The undefined acronym problem strikes yet again. It is fantastic to never use to AI write your blog posts, but please at least have it read it once. It's literally free to catch these simple writing errors and improve your writing. Vis-a-vis:

     Everyone Should Know AI
     AI has a reputation for being complex. I've met many very good software engineers who dismiss it as something too complex to learn or a niche meant for only highest-performance, not useful everyday. I think that's wrong. AI can be simple to understand, and common AI editorializing can speed up a blog, and almost always follows the same general shape. Once you learn the basics, editorializing with AI is just easy. And when it's not, it's usually a good sign to skip it for now. Every developer should know at least that much AI.
Post reply on HN