CppCon 2016: Serge Guelton “C++ Costless Abstractions: the compiler view"

Play CppCon 2016: Serge Guelton “C++ Costless Abstractions: the compiler view"
Sign in to queue


Published on Oct 7, 2016

Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/cppcon/cppcon2016

One of the motto of C++ is « costless abstractions », a.k.a. you only pay for what you use. To achieve this goal, modern C++ puts a heavy burden on the compiler. But what does the compiler really does when it meets an exception? When it finds a nested lambda? When it encounters a structure that wraps a single scalar?
During this talk, we'll go trough a set of innocent C++ sample that involves several data types and algorithms from the standard library, and verify that the costless abstraction principle holds, especially when looking at the difference between several optimization level, eventually digging into specific compiler optimization to understand what happens under the hood.
This talk uses Clang++ as the reference compiler, and relies on its LLVM bitcode output to explain how the abstractions are lowered (or completely pruned) at the Intermediate Representation level.

Serge Guelton

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com





Right click to download this episode

The Discussion

Add Your 2 Cents