C++Now 2018: Matt Godbolt “What Else Has My Compiler Done For Me Lately?”

Channel:CppNow · Length:1:30:03 · Published:2018-06-07 · Views:10585

Watch on YouTube

Summary

Matt Godbolt, creator of Compiler Explorer, tours surprising optimizations modern compilers perform, such as turning loops into closed-form sums and using popcount instructions. He explores what the compiler does behind the scenes.

Why HN recommends it

HN recommends it as a detailed, entertaining look at the crazy optimizations compilers do.

Both are great presentations going into details on some of the crazy optimizations compilers will do. — HN, 2019

C, C++, Rust, Go & systems languages · Software performance & optimization · Compilers, interpreters & program analysis

Subtitles (excerpt)

I presented all of the information here at CPP now sorry this is CPP now at CPP con last year and on Friday afternoon I received a phone call from John and he asked whether I could fill in at rather the last minute for somebody who dropped out and so I'm this is kind of a performance art piece called what happens if you have five days to prepare a new talk and that you spend the last five days either traveling or attending other people's talks so you haven't really done anything at all so as the astute of you've already picked out this is this differs from my CPP con talk by the word else but there are other things that have changed so the beginning part will be a bit similar to the the CPP con one but then we're gonna go off and do some other more in try exciting and interesting things so I'm Matt Gobbo as you probably have already read um this is called what else is my compiler done for me lately unbolting the compilers lid again so the outline of this is I'm going to retell the compiler Explorer story how it came about why it exists I'm gonna give a bit of an assembly 101 because most of my slides are full of assembly code x86 assembly code which is usually a big turn-off for everyone but

On Hacker News

I highly recommend Matt Godbolt's talk "What has my compiler done for me lately?"[0] and its follow-up[1]. Both are great presentations going into details on some of the crazy optimizations compilers will do. As someone who knows very little about the inner workings of compilers my mind was blown when I saw some them. [0] [LINK] [1] [VIDEO] — snailmailman, 2019-09
Tangent, but this reminds me of this great talk by Matt Godbolt from CppCon 2017: “What Has My Compiler Done for Me Lately? Unbolting the Compiler's Lid” [LINK] . And the follow up [VIDEO] . — manaskarekar, 2020-04
This is not Rust specific, this is a compiler thing, both LLVM and GCC can detect sums and generate closed form formulas instead. There are other fun algorithm detections - e.g. if you try to do bitcounts yourself, LLVM will use popcnt instead. Compilers are awesome, check out Matt Godbolt's talk on this very topic: [VIDEO] — drej, 2020-02
Doesn't look like it works any more. In any case, Matt Godbolt has spoken a bit about the architecture of Compiler Explorer. Seems like he's given some thought to security. [LINK] [VIDEO] — foxrob92, 2018-12

Related videos