Overview
Explore the intricacies of compiler benchmarks and their implications for metaprogramming implementation strategies in C++ in this CppCon 2022 conference talk. Dive into the development of reliable portable benchmarks for compilers using advanced metaprogramming constructs in C++20 and C++17. Examine the results of supercomputer-generated benchmarks to analyze the real costs of class templates, function templates, generic lambdas, value-based metaprogramming, and concepts on compile-time for various compilers and versions. Gain insights into optimal metaprogramming patterns for maximizing compile-time performance and understand the current state of compile-time optimization in modern compilers.
Syllabus
Introduction
The Question
Context
Metaprogramming
Requirements
Challenges
Strategy
Type sequence
Type Trees
args
How to implement
How to access them
Packs
Array Structure
Meta Functions
Compute Parmentation
Compute Example
Reference Timing
Tuples
Performance Comparison
TypeBased vs FunctionBased
Memory Consumption
Conclusion
Questions
Taught by
CppCon