3 ms·
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 par
by spockz 3mo ago
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.
- nananana9 3mo agoI'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.
- dupontcyborg 3mo agothis would be amazing
- Rendello 3mo agoJust 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 https://nnethercote.github.io/perf-book/inlining.html
- rurban 3mo agoThe gcc torture test suite has for most vect/ tests ast checks to see such regressions. LLVM missed it.