Everyone Should Know SIMD (mitchellh.com)

36 points by WadeGrimridge 2 hours ago

qurren 22 minutes ago

I just do gcc -O3 and get SIMD without having to learn it

ashton314 10 minutes ago

In the article, Mitchel mentions how this doesn’t always work. In fact, as someone who’s worked in compiler development, I can say it’s a small miracle when it does work.

forrestthewoods 17 minutes ago

auto-vectorization is not nearly as good as you would hope it to be.

The best SIMD optimizations likely require changing your data format from AoS to SoA.

nylonstrung 4 minutes ago

The one feature in Jonathan Blow's Jai language I really envy is a a single keyword to switch AoS to SoA and visa-versa at comptime

raegis 9 minutes ago

What are AoS and SoA?

Georgelemental 5 minutes ago

nylonstrung 6 minutes ago

formerly_proven 8 minutes ago

And -march=native or at least -march=x86-64-v3 or similar, alternatively identifying relevant functions and manually invoking FMV and uarch specialization via target_clones. Plus non-integer code can generally not be autovectorized in normal-math mode since FP is non-commutative.

Joker_vD 4 minutes ago

Well, then I just prompt Claude and get SIMD without having to learn it /s