HackerTube

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
YouTube
talk · intermediate · evergreen · 2018–2022 on HN

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.

12 comments from Hacker News

@snailmailman2019-09 · in “Popcount CPU instruction”

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

Strongly recommends View on HN
@drej2018-12 · in “Compiler Explorer”

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

Strongly recommends View on HN
@s3cur32021-03 · in “Performance comparison: counting words in Python, Go, C++, C, Awk, Forth, Rust”

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. :(

Recommends View on HN
@manaskarekar2020-04 · in “I translated a simple C program to x86_64 and it was slower”

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 .

Recommends View on HN
@fps_doug2019-09 · in “Color Emulation”

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)

Recommends View on HN