Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

100% Positive

Analyzed from 180 words in the discussion.

Trending Topics

#simd#auto#aos#soa#gcc#without#having#learn#doesn#vectorize

Discussion (3 Comments)Read Original on HackerNews

qurren•about 1 hour ago
I just do gcc -O3 and get SIMD without having to learn it
ashton314•about 1 hour 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.
mitchellh•35 minutes ago
Case-in-point, the example in my own post doesn't auto-vectorize with LLVM or GCC at highest optimization levels. Basically, compilers will never auto-vectorize loops with an early loop break afaik.
forrestthewoods•about 1 hour 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.

ethin•31 minutes ago
Either this or you have to do special tricks like pairwise tree reductions and hand-unroll certain portions of loops.
nylonstrung•43 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
mbStavola•33 minutes ago
Didn't he drop this feature years ago?
raegis•about 1 hour ago
What are AoS and SoA?
Georgelemental•44 minutes ago
Array of Structs and Struct of Arrays https://en.wikipedia.org/wiki/AoS_and_SoA
nylonstrung•44 minutes ago
Array of Structs and Struct of Arrays
formerly_proven•about 1 hour 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•42 minutes ago
Well, then I just prompt Claude and get SIMD without having to learn it /s