~/talk

Faster programs with your compilers autovectorization feature

Talkat NDC TechTown 2025 · 2025-09-22..09-25· [rust]
links:none on file
slides:none on file

Explains how compilers emit SIMD instructions, shows Clang/GCC/MSVC vectorization-report flags and why cost model indicates not beneficial appears, and demonstrates concrete fixes: give the compiler -O3 plus proper -march flags, convert arrays-of-structures to structure-of-arrays, apply loop interchange/peeling/unswitching or loop-distribution to turn random/strided accesses and iterator-dependent conditionals into sequential or constant accesses, use temporaries to remove loop-carried deps, and use pragmas or -ffast-math when acceptable; several examples (matrix multiply, image column sums, histogram) show multi× speedups after these minimal changes.

AI-written summary · about

  1. 0:00Compiler autovectorization intro
  2. 1:33How vectorization speeds up
  3. 3:19Compiler flags for vectorization
  4. 5:08Inhibitors of compiler vectorization
  5. 6:10Memory access patterns
  6. 10:31Loop interchange fix
  7. 16:12Vectorization with classes
  8. 19:44Loop invariant conditions
  9. 23:17Iterator-dependent loops
  10. 25:21Simplify loop body
  11. 27:07Low trip count loops
  12. 29:36Loop carry dependencies
  13. 35:18Compiler idiosyncrasies
  14. 38:06Floating-point precision
  15. 39:27Manual vectorization
  16. 40:13Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.