Skip to content
0:00 / 0:00

#compilerexplorer#assembly#optimization

KEYNOTE: What Everyone Should Know About How Amazing Compilers Are - Matt Godbolt [C++ on Sea 2019]

cpponsea

18K subscribers • 6 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • A classic. People kept recommending it from 2019 to 2026.
  • Presented by Matt Godbolt

Intermediate. Assumes working knowledge.

73K views7 years ago2 recommendations

Systems programmingProgramming languagesCompilers and interpretersPerformance and optimizationC++

Matt Godbolt demonstrates how modern compilers optimize code and generate efficient assembly, showing how to read and trust compiler output.

cpponsea.uk We use them every day, but how often do we stop to think about the kinds of amazing things our compilers do for us? Modern compilers are a feat of engineering and in this talk Matt will demonstrate just a few of the very cunning things they do for you. Matt will concentrate on the output of the compiler: the tricks they use to generate efficient, optimized assembler code. Writing clear, readable code that's also efficient hinges on being able to trust your compiler's code generator. By the end of this talk, you'll be be able to read assembly well enough to be able to appreciate your compiler, and have an understanding of what it can - and can't - optimize for you. --- Matt is a C++ programmer and occasional verb. He loves writing efficient code and sharing his passion about how computers work under the hood. An engineer at Coinbase, he has previously worked at a trading firm, on mobile apps at Google, run a C++ tools company and spent more than a decade making console games. When not tinkering on Compiler Explorer, Matt enjoys working on emulators for old 8-bit computer hardware. cpponsea.uk/2019/sessions/keynote-what-everyone-should-know-… Filmed and Edited by Digital Medium Ltd: events.digital-medium.co.uk Enquiries: events@digital-medium.co.uk

Why it's here

2 people recommend this

What people say. Recommended to show how modern compilers optimize code and why developers can trust them to generate efficient assembly.

Moments people linked to

u/triffid_hunterin r/embedded • Recommends

On “How can I practice armv7a assembly code writing ?”

> Do you work on assembly programming in arm? No, I trust the compiler, because they're better at writing assembly than the dramatic majority of humans these days. Relevant video Occasionally it's helpful to know *just* enough about assembly to check if your code is making the compiler do something weird though.

u/Ashnoomin r/embedded • Recommends

On “Bit shifting to save time instead of using multiplication and division operators”

I am sorry but I advice you to watch link to this video (from timestamp) (or the whole thing which is very insightful)
2View on Reddit

u/ShinyHappyREMin r/programming • Mentions

On “Breaking the software licensing of early-2000s abandonware: reverse engineering for software preservation”

> Program design doesn't (or shouldn't anyway,) take into account how things get done at a low level. That's what compilers are for. A compiler can easily miss things, they're tools not magic wands. In particular they can't fix your data layout and data access patterns.
5View on Reddit