News for hackers. Stuff that matters.
Re:FFmpeg School of Assembly Language by variadix on Saturday February 22, 2025 @02:01PM (#43141962)
C compilers are still pretty bad at auto vectorization. For problems where SIMD is applicable, you can reasonably expect a 2x-16x speed up over the naive scalar implementation.
Re:FFmpeg School of Assembly Language by astrange on Saturday February 22, 2025 @07:00PM (#43144642)
Also, if you write code with intrinsics the autovectorization can make it _worse_. eg a pattern is to write a SIMD main loop and then a scalar tail, but it can autovectorize that and mess it up.
Re:FFmpeg School of Assembly Language by janwas on Sunday February 23, 2025 @11:07AM (#43150270)
Given the wider availability of masking (AVX-512, RISC-V and SVE), I figure scalar tails are no longer the preferred pattern everywhere.