News for hackers. Stuff that matters.
Re:Everyone Should Know SIMD by spockz on Thursday July 23, 2026 @05:21AM (#49018892)
Is there some way to write unit tests for cases where you know vectorisation should have been applied? I guess micro benchmarks should cover the performance part. We have ArchUnit to cover code structures, it would be nice if something similar exists for generated assembly.
Re:Everyone Should Know SIMD by nananana9 on Thursday July 23, 2026 @08:30AM (#49020529)
I've been begging for years for a a [[must_vectorize]] annotation that I can place before a loop I care about, and turn it into a compile error if the compiler can't figure it out.
Re:Everyone Should Know SIMD by dupontcyborg on Thursday July 23, 2026 @08:39AM (#49020630)
this would be amazing
Re:Everyone Should Know SIMD by Rendello on Saturday July 25, 2026 @11:28PM (#49054408)
Just don't do it like Rust inlining annotations:

<No annotation> – Gently suggests inlining

#[inline] - Really suggests inlining

#[inline(always)] – Really Really suggests inlining (still not guaranteed!)

https://nnethercote.github.io/perf-book/inlining.html

Re:Everyone Should Know SIMD by rurban on Friday July 24, 2026 @02:12AM (#49031766)
The gcc torture test suite has for most vect/ tests ast checks to see such regressions. LLVM missed it.