CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!"
Channel:CppCon · Length:1:29:53 · Published:2015-09-27 · Views:188402
Summary
Chandler Carruth walks through tuning C++ performance, from writing benchmarks to analyzing results on real CPUs and compilers. It focuses on small-scale problems such as loop kernels, data structures and algorithms, and on keeping compilers from optimizing benchmarks away.
Why HN recommends it
HN recommends it as an eye-opening primer on benchmarking and performance analysis, especially for people who have not benchmarked on Linux.
Optimizing the Emergent Structures of C++ — HN, 2016
C, C++, Rust, Go & systems languages · Software performance & optimization
Subtitles (excerpt)
So I'm going to turn it over to our headliner: Chandler Carruth. Thank you. (applause) CHANDLER: Morning everybody How are you guys doing? Excellent, excellent! So everyone who is at the back, you're going to want to scoot up a bit, OK? This is fair warning! Guys, you might want to start that shuffle process now... You're going to want to be able to read very little bitty text up here, for the whole talk, OK. So, my name is Chandler Carruth, I'm here from Google where I'm the C++ and LLVM tech lead I do a lot of fun compiler stuff, I do a lot of fun programming language stuff at Google and I'm here to talk to today about tuning C++. When I say tuning C++ I mean tuning C++ for performance - like runtime performance we want to have really fast and efficient code It's one of the primary reasons why we still use C++ today is to get the last one and two percent of performance. I'm going to try to talk to you a little about how you can do that, I'm going to cover thing like benchmarking Some of the crazy things we see with CPUs Compilers (which are my bread and butter) All kind of crazy stuff Sound good? OK there are a couple of caveats. The first caveat is, and I actually do feel a little bit bad about this,
On Hacker News
Here's a few: - "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!" [VIDEO] - "Understanding Compiler Optimization" [LINK] - "Optimizing the Emergent Structures of C++" [LINK] - "Efficiency with Algorithms" [LINK] The first one is really good if you've never benchmarked anything in a Linux environment. Or if you otherwise want to learn how to investigate how C++ gets turned into machine cod… — humanrebar, 2016-05
There is a very interesting talk [1] by Chandler Carruth that I stumbled upon last weekend that is very much related to this [1] [VIDEO] — thomashusa, 2020-03
Interestingly, there's quite a bit that's needed to ensure you bypass some compiler optimizations. Here's an ey-opening (for me) talk[1] on benchmarking C++ and compilers which touched on it. 1: [VIDEO] — kbenson, 2015-10
> Anecdote: Optimum C blew away all the other C compilers on a magazine benchmark article because it figured out that the benchmark code did nothing and deleted it. I remember this problem being discussed in a CPPCon talk a few years ago, and some ways to "trick" the (modern) compilers into not optimising away the benchmark code - I think it was Chandler Carruth's "Tuning C++" talk: [VIDEO] — misnome, 2019-08
Related videos
- Run containers on bare metal already! · Bryan Cantrill · 41:12
- Zebras All the Way Down - Bryan Cantrill, Uptime 2017 · Code & Supply · 46:36
- Principles of Technology Leadership | Bryan Cantrill | Monktoberfest 2017 · RedMonk Tech Events · 51:22
- Bryan Cantrill from Joyent on Manta: internet-facing object storage facility that features compute · AI Council · 1:31:05
- "Voice Driven Development: Who needs a keyboard anyway?" by Emily Shea · Strange Loop Conference · 41:17
- Maciej Ceglowski - Barely succeed! It's easier! · webdirections · 39:23
- The Material Science of Metal 3D Printing · Real Engineering · 14:59
- The Forgotten Art of Structured Programming - Kevlin Henney [C++ on Sea 2019] · cpponsea · 1:29:27
- What prevents the poor from reaching the middle class? | VISION TALKS · American Enterprise Institute · 18:10
- CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures" · CppCon · 1:13:41
- 2013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++ · CppNow · 1:33:01
- How Python was Shaped by leaky Internals, Armin Ronacher, Flask framework · Видео с мероприятий {speach! · 49:55
- CppCon 2015: Andrei Alexandrescu “std::allocator...” · CppCon · 1:12:27
- Lexical Scanning in Go - Rob Pike · GoogleFOSSSydney · 51:17
- Preventing the Collapse of Civilization / Jonathan Blow (Thekla, Inc) · DevGAMM · 1:02:41
- "Performance Matters" by Emery Berger · Strange Loop Conference · 42:15