• Your Performance Todo List: The Most Important Performance Opportunities and Pitfalls to Remember About

    This is the interactive slide deck for my CppCon 2022 talk. Writing efficient programs is hard. This is because it requires a lot of knowledge, experience and strategic thinking. There have been many talks on optimization and often each addresses a single concept. Being able to achieve a bird’s eye view of factors affecting performance often requires many hours of researching the topic. To lessen the mental burden of optimizing programs, I have picked out the techniques, I believe are most important. During the talk, I will present them in an organized manner and provide practical examples of how they can be applied. I will first discuss what I believe are the main goals efficient programs strive to achieve. Then, I will present the general methods of achieving those goals. Then, for the majority of the talk, we will discuss a few dozen performance opportunities. For each of them, I will explain the underlying mechanism of how the optimisation works. I will avoid bluntly giving guidelines to follow without explanation. Each of the techniques naturally comes with its costs, and those will be discussed as well. I will additionally discuss various performance pitfalls. These are sometimes called “premature pessimisations” in contrast to the often used term of “premature optimizations”. I will show examples of optimizations which do not incur any cost on program readability or ma

  • GIT

  • OOP Part 9

  • RTTI

  • Multiple Inheritance

  • Polymorphism

    A presentation about polymorphism: ad hoc polymorphism - function overloading and operator overloading, parametric polymorphism - templates - and dynamic polymorphism - virtual functions as well as nested classes. Also on the show: vtables, abstract classes, override, final, interfaces and slicing.

  • Smart Pointers and Inheritance

    A presentation about different ways of taking function parameters and returning values from functions and smart pointers such as std::unique_ptr, std::shared_ptr, std::weak_ptr as well as public inheritance and the protected qualifier, in-class using-declarations, base class member shadowing and the basics of polymorphism. It is presented here: https://www.youtube.com/watch?v=pIj3C6sveUM .

  • Ownership and Copy & Move Semantics

    A presentation about ownership, copy semantics and move semantics covering copy constructors, move constructors, copy assignment operators, move assignment operators, the rule of 0, the rule of 5, as well as value categories, exception guarantees and the copy-swap idiom. It is presented here: https://www.youtube.com/watch?v=zN45skruTvI .

  • Object Oriented Programming Part 3

    A presentation about member pointers, user defined conversions, friends and operator overloading in C++. It is presented here: https://www.youtube.com/watch?v=C1javGeyR_w .

  • RAII

    A presentation about constructors, destructors and RAII. It is presented here: https://www.youtube.com/watch?v=yDrIHAS2JgY .

  • OOP in C++ Part I

    A presentation about programming paradigms and their applications to C++. It is presented here: https://www.youtube.com/watch?v=fzpzCVNQva8 .

  • Errors

    A presentation about compilation errors, the as-if rule, undefined behavior, implementation defined behavior, error codes, std::optional, std::abort, exceptions. It is presented here: https://www.youtube.com/watch?v=ASOc73uTsdo .

  • Functions

    A presentation about noexcept functions, try catch functions, inline functions and variables, function overloading, default function parameters, lambdas (unnamed functions), function pointers, and constexpr (consteval,constinit) functions and variables in C++ as well as std::function. It is presented here: https://www.youtube.com/watch?v=Sqaocm3f7OY .

  • Random Things

    A presentation about many different C++ features. It is presented here: https://www.youtube.com/watch?v=xvxlPMNQuRM .

  • Low level performance

    A presentation about cache and branch prediction. It is presented here: https://www.youtube.com/watch?v=qicj1F88H78 .

  • Lifetime and References

    A presentation about the lifetime and references in C++. It is presented here: https://www.youtube.com/watch?v=3TG_hnd3qqg .

  • Memory and Pointers

    A presentation about the memory and pointers in C++. It is presented here: https://www.youtube.com/watch?v=CSKsKfSJq6w .

  • The C++ Build Pipeline

    A presentation about the C++ build pipeline. It is presented here: https://www.youtube.com/watch?v=Ev8DrjtBtNg .

  • Rynek