CppCon 2017: Matt Godbolt “What Has My Compiler Done for Me Lately? Unbolting the Compiler's Lid”
CppCon7 HN recommenders · recommended in 6 months, 2018-2022
178K views · 9 years ago · talk · evergreen
Matt Godbolt's CppCon 2017 talk shows what modern compilers do with your C++ code, using Compiler Explorer to inspect generated assembly. It covers surprising optimizations and how the tool works.
HN recommends it as an entertaining, mind-blowing look at compiler cleverness from a great speaker.
1:30:03C++Now 2018: Matt Godbolt “What Else Has My Compiler Done For Me Lately?”
CppNow
11K views • 8 years ago
1:00:21CppCon 2019: Matt Godbolt “Compiler Explorer: Behind The Scenes”
CppCon
29K views • 7 years ago
55:42CppCon 2019: Matt Godbolt “Path Tracing Three Ways: A Study of C++ Style”
CppCon
77K views • 7 years ago
1:33:022013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++
CppNow
34K views • 13 years ago
1:19:52CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”
CppCon
264K views • 10 years ago
1:00:58CppCon 2017: Chandler Carruth “Going Nowhere Faster”
CppCon
113K views • 9 years ago
1:29:54CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!"
CppCon
188K views • 11 years ago
1:29:06CppCon 2015: Herb Sutter "Writing Good C++14... By Default"
CppCon
193K views • 11 years ago
57:39CppCon 2016: Chandler Carruth “Garbage In, Garbage Out: Arguing about Undefined Behavior..."
CppCon
94K views • 10 years ago
1:35:12Modernizing Compiler Design for Carbon Toolchain - Chandler Carruth - CppNow 2023
CppNow
71K views • 3 years ago
1:04:26CppCon 2018: G. Nishanov “Nano-coroutines to the Rescue! (Using Coroutines TS, of Course)”
CppCon
40K views • 8 years ago
1:39:25CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”
CppCon
149K views • 10 years ago
1:36:27CppCon 2016: Dan Saks “extern c: Talking to C Programmers about C++”
CppCon
175K views • 10 years ago
1:01:09Plenary: Performance Matters - Emery Berger - CppCon 2020
CppCon
32K views • 6 years ago
1:47:45CppCon 2017: Herb Sutter “Meta: Thoughts on generative C++”
CppCon
105K views • 9 years ago
1:13:41CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"
CppCon
235K views • 12 years ago
1:14:22CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?”
CppCon
288K views • 9 years ago
1:40:27CppCon 2014: Herb Sutter "Back to the Basics! Essentials of Modern C++ Style"
CppCon
323K views • 12 years ago
1:02:33CppCon 2017: Kate Gregory “10 Core Guidelines You Need to Start Using Now”
CppCon
144K views • 9 years ago
31:19CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"
CppCon
122K views • 10 years ago
12 comments from Hacker News
It's the CppCon 2017 talk with the title "What has my compiler done for me lately? Unbolting the compiler's lid". The Compiler Explorer backstory starts here: ▶ this video
Link to the (great) CppCon talk: ▶ this video The one thing I would say is: as you dig more into C++ perf, you can develop an intuition for the kinds of things the compiler can and can't optimize. For instance, the C++ example from the article uses `std::unordered_map`, which is just an absolute mess from a cache locality perspective—the best compilers today (or of the foreseeable future) can't do a thing to fix that. Improving the programmer's choice of data structure is just not on the radar. :(
If you are wondering how it works, here is Matt Godbolt himself explaining it. Surprisingly simple and cheap. ▶ this video
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” ▶ this video . And the follow up link .
But please keep in mind that today's compilers are (most of the time) very smart. Hacker's Delight is somewhat outdated today. There's no need anymore for writing "x << 2" instead of "x * 4". I recommend Matt Godbolt's Talk(s) about compiler cleverness: ▶ this video (see the 30 minute mark for the multiplication example)
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] ▶ this video [1] link
There's a neat example in [1] where clang replaces a loop summing integers 0..i with the closed form version. [1] ▶ this video
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. ▶ this video link
Matt Godbolt is a great speaker as well. I loved this talk that included a bit about the architecture behind his Compiler Explorer. The rest of his talk is super cool as well. E.g. closed form solutions from O(n) code? Compilers are awesome. ▶ this video
CppCon has super interesting content. That comes from a person who has written maybe two dozen lines of C++ code, mostly just hello world. E.g. this talk by Matt Godbolt or anything by Chadler Carruth. ▶ this video
What has my compiler done for me lately? - Matt Godbolt ▶ this video Entertaining talk, not extremely in depth, though.
You should check out this presentation done by Matt Godbolt about compiler internals. He talks about what kind of optimizations are being done by GCC and Clang. Pretty amazing stuff. For example, the compiler will figure out you are trying to write a pop count in high level code and replace it with a single popcount instruction. ▶ this video