Speed for Free - current state of auto vectorizing compilers
summary
Auto-vectorization in recent compilers is now often usable at default O2 and can reach hardware limits for tight linear algebra (on the presenter’s Zen4 that’s ~32 floating point ops per cycle), but results vary: GCC and Clang differ in aggressiveness, Clang often wins at O2, hand-written intrinsics still beat generated code for tricky cases. RGB planar shuffles vectorize but emit large peeling code because masked loads/stores are missing, string find shows modest 4x–20x speedups while ideal approaches promise much more with proper masking and outer-loop vectorization.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:28Why vectorization matters
- 3:57What is vectorization
- 5:24Linear algebra test case
- 10:26Irregular data structures
- 17:21Nested loops and strings
- 25:34Compacting filtered data
- 29:03Legacy code results
- 32:44Compiler performance
- 35:40What compilers miss
- 36:44Summary & Q&A
related talks
01h 02mSqueezing the Hardware to Make Performance Juice
01h 00m“Want fast C++? Know your hardware!"
01h 04mDesign for Performance
01h 37mAn Overview of Program Optimization Techniques
01h 01mFaster, Easier, Simpler Vectors
54mFast C++ by using SIMD Types with Generic Lambdas and Filters
12mVectorCDC: Accelerating Data Deduplication with Vector Instructions
55mCode Size Compiler Optimizations and Techniques for Embedded Systems
