** Separate registration is required for CppCon Academy Classes. **Class PageYour compiler is smart, but it is not a magician. It cannot fix a design that fights the hardware, nor can it optimize code that hides its intent. To achieve the peak performance C++ is capable of, you must master the deep interplay between the language, the compiler, and the physical machine. Most C++ developers know how to write code that is correct. Fewer know the actual cost of the abstractions they use. And only a small fraction understand how the compiler translates those abstractions into physical execution.
This class reveals the “secret life” of your application. We move beyond standard optimization advice to explore the mechanical sympathy required to squeeze every cycle out of modern systems. We will examine code from three perspectives: the hardware that executes it, the compiler that generates it, and the language rules that constrain it. We will demonstrate that performance is not an afterthought but a fundamental part of the design specification. You will learn how to validate that specification early—running “estimation benchmarks” on mock-ups to predict performance before writing a single line of production code.
We will unlock the specific behaviors that dictate speed across three critical layers:
- The Hardware Reality: Moving beyond “cache friendly” to understand the physics of the memory hierarchy, pipeline hazards, and why data layout often matters more than instruction count.
- The Compiler Partnership: How to read assembly to verify optimizations, how to structure code so the compiler can vectorize it, and understanding the critical (and often misunderstood) role of Undefined Behavior in generating efficient code.
- Design for Performance: How to integrate performance constraints into your architecture from day one, using estimation techniques to distinguish feasible designs from dead ends.
Crucially, we will challenge the myth that efficient code must be unreadable. We will point out concrete examples of how modern design practices and clean coding styles often align perfectly with hardware requirements, allowing you to write software that is maintainable, robust, and ruthlessly efficient.
This class is about performance and efficiency, spanning the entire range from the fundamentals of the hardware to the peculiarities of compiler optimizations. You will learn, on practical examples extracted from real-life programs, how to measure, analyze, and improve the performance of your programs. But most importantly, you will learn how to understand why your programs, compilers, and hardware behave the way they do. Some of the material will be basic and fundamental, some cutting-edge and esoteric, and the rest somewhere in between. All explanations will be reinforced with hands-on exercises, which you get to do in the classroom and can explore later in detail if you want to learn more.