CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!"

CppCon3 HN recommenders · 2015–2020
188K views · talk · evergreen · Uploaded 2015-09-27

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.

HN recommends it as an eye-opening primer on benchmarking and performance analysis, especially for people who have not benchmarked on Linux.

Watch on YouTube

4 comments from Hacker News

@kbenson2015 · in “Do you know how much your computer can do in a second?”

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]

RecommendsView on HN
@humanrebar2016 · in “Why I don't spend time with Modern C++ anymore”

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 code.

Strongly recommendsView on HN
@misnome2019 · in “Why Const Doesn't Make C Code Faster”

> 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]

@thomashusa2020 · in “When Bloom filters don't bloom”

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]

RecommendsView on HN