Workshop: Fastware: The Art of Optimizing C++ Code

This class introduces attendees to a thorough approach to optimisation techniques for contemporary computing architectures. It is based on material from Andrei's upcoming book Fastware. In turn, the book is based on Andrei's career-long experience with tuning the performance of various software systems, from Machine Learning research to high-performance libraries to Facebook-scale computing backends.

Such information is scant and difficult to find. Software engineering folklore is rife with tales of optimisations. Programmers commonly discuss and argue whether a piece of code is supposed to be faster than another, or what to do to improve the performance of a system small or large.

Optimisation is big. Arguably it's bigger today, when serial executi- on speed has stalled and, after parallelizing what's possible, we have single-thread speed as the remaining bottleneck. A large category of applications have no boundaries on desired speed, meaning there's no point of diminishing returns in making code faster. Better speed means less power consumed for the same work, more workload with the same data center expense, better features for the end user, more features for machine learning, better analy- tics, and more.

Optimizing has always been an art, and in particular optimizing C++ on contemporary hardware has become a task of formidable comple- xity. This is because modern hardware has a few peculiarities about it that are not sufficiently understood and explored. This class offers a thorough dive in this fascinating world.

Intended audience

This is aimed at C++ programmers who have efficiency of generated code as a primary concern.


The format is a highly interactive lecture. Questions during the lecture are encouraged. Use of laptops for trying out examples is allowed.


Andrei Alexandrescu


Twitter @incomputable

Andrei Alexandrescu is a researcher, software engineer, and author. He wrote three best-selling books on programming (Modern C++ Design, C++ Coding Standards, and The D Programming Language) and numerous articles and papers on wide-ranging topics from programming to language design to Machine Learning to Natural Language Processing. Andrei holds a PhD in Computer Science from the University of Washington and a BSc in Electrical Engineering from University "Politehnica" Bucharest. He currently works with the D Language Foundation.