Modern C++: When Efficiency Matters is a two-day onsite training course with programming examples, taught by Andreas Fertig. It is offered at the Gaylord Rockies from 09:00 to 17:00 Aurora time (MDT) on Saturday and Sunday, September 13th and 14th, 2024 (immediately prior to the conference). Lunch is included.
Course Description
You want to learn how to write efficient C++ because you
- care for the speed of your product?
- like to write robust code?
- write code for a constrained device?
Then consider this class!
You will learn about various features of modern C++, how they work, where to use them, and how they translate to code. With that knowledge, you understand what each feature brings you and its costs regarding code size and performance.
You will learn how to write less code and get the same result. Less code helps you to save human resources when it comes to maintenance and debugging.
In times when a lot of applications are battery-powered, saving run time is a great asset. As part of this class, you will learn to control your binary’s footprint and speed.
You will learn all topics with exercises and live demos in C++ Insights and Compiler Explorer.
Prerequisites
Students are expected to have a basic knowledge of C++11.
Course Topics
- How a std::initializer_list works
- Scope control using if or switch with initialization
- Safe and efficient constructors
- In-class member initialization
- Constructor inheritance and its trap
- How to get good performance
- Alignment and padding
- The importance of caching
- How noexcept helps you
- static vs. inline
- The powers of CTAD
- Under the hood of lambdas
- Lambda captures and their implications
- Generic as well as templated (a preview into C++20)
- Templates
- Variadic templates
- Recursive variadic templates vs. fold-expressions
- Guidelines for efficient use of templates
- Devirtualize your virtual functions with final
- How a local non-trivial static variable works
- The power of compile-time vs. run-time
- How and when to apply constexpr
- How to achieve constant initialization
- Select only the data you need with constexpr if
- Move-semantics
- Move or copy?
- The difference between std::move vs std::forward
- Make your move-operations noexcept: noexcept, move, and STL containers
- Know the costs of the abstraction: shared-/unique-ptr
- Using the STL efficiently
- Choosing the right container for your data
- Best to use container methods for performance
Register Here
Course Instructor
Andreas Fertig is an expert C++ trainer and consultant who delivers engaging and impactful training sessions, both on-site and remotely, to teams around the globe.
As an active member of the C++ standardization committee, Andreas contributes directly to shaping the future of the language. He shares insights on writing cleaner, more efficient C++ code at international conferences. He publishes specialist articles, e.g., for iX magazine, and has published several C++ textbooks.
With C++ Insights (https://cppinsights.io), Andreas has created an internationally recognized tool that enables users to look behind the scenes of C++ and thus understand constructs even better.
Discover more about Andreas and his work at andreasfertig.com.