Expression Templates Revisited
summary
Reevaluates expression templates with concrete benchmarks: Blitz++ and Boost uBLAS reach C‑like speed for vector add but crash on big matrix multiply, losing to MKL and hand‑tuned kernels by orders of magnitude; on a 2.2 GHz AVX machine with a 17,600 MFLOPS peak the naive ET version hits ~5% of peak (a real case rises to 15–20% after removing ET), while smart expression templates using ~100 optimized kernels match MKL and make parallelism pay only above a ~10,000‑element threshold.
AI-written summary · about
chapters (18)
- 0:00Start
- 7:18Addition Operator
- 8:55Expression Templates Are Easy To Use and Apply
- 10:31Expression Templates Are Performance Optimization
- 10:48Classical Libraries That Are Implemented Using Expression Templates
- 15:17Vector Addition
- 15:32Matrix Matrix Multiplication
- 16:06Matrix Multiplication
- 17:49Optimize Matrix Multiplication
- 22:31Expression Templates Are Not a Performance Optimization
- 23:41Expression Templates Revisited
- 24:02Performance Optimization
- 24:33Smart Expression Templates
- 25:02Optimized Kernels
- 38:13Do Expression Templates Help
- 38:27Expression Templates Are Easily Parallelized
- 41:59Parallelization
- 54:41Benchmarks
related talks
01h 03mTemplates Made Easy with C++20
01h 03mTemplate-less Metaprogramming in C++
01h 11mC++20 Templates: The next level: Concepts and more
01h 01mBack to Basics: Templates (part 1 of 2)
06mLightning Talk: C++20 - A New Way of Meta-Programming?
01h 03mTemplate Metaprogramming: Practical Application
57mTemplate Shenanigans
01h 02mTaking Static Type-Safety to the Next Level - Physical Units for Matrices
