Please rotate your tablet to be horizontal.

You can dismiss this notice but please note that this experience has not been designed for mobile devices and so will be less than optimal

Back To Schedule

C++20’s [[likely]] Attribute

Optimizations, Pessimizations, and [[unlikely]] Consequences

09:00 - 10:00 Friday 16th September 2022 MDT Summit 8 & 9 / Online C
Intermediate
Advanced
Expert
Idioms & Techniques

C++20 added the [[likely]] and [[unlikely]] attributes, which formalize existing compiler builtins. As users of the latest standards, we all want to use them in our code and get better performance - but should we?

In this talk we investigate what these attributes mean, the risk of using them incorrectly (and even the risk of using them correctly!) and whether they’re actually worth the effort. We will dive deep into branch prediction, optimizations and pessimizations, and the art of benchmarking. We will see that in C++ questions that seem simple to begin with do not get a simple answer, but an interesting one!

Participants of the talk will hopefully improve their knowledge of performance tuning, and how to focus efforts in things that really matter for performance.

Amir Kirsh

Teacher, Dev Advocate, Academic College of Tel-Aviv-Yafo and Incredibuild

C++ lecturer at the Academic College of Tel-Aviv-Yaffo and Dev Advocate at Incredibuild. Previously the Chief Programmer at Comverse. Co-organizer of Core C++ conference and a member of the Israeli ISO C++ NB. Currently a visiting researcher at Stony Brook University, New-York.

Tomer Vromen

Dell Technologies

Software engineer at Dell Technologies, programming in C++ for 10 years. Interested in algorithms, software development, and long distance running.