Plenary: Performance Matters - Emery Berger - CppCon 2020

CppCon · 32K views · 2020 · 1:01:09

Open on YouTube

Software performance & optimizationC, C++, Rust, Go & systems languagestalk

Why Hacker News recommends it

Recommended for treating benchmarking and profiling scientifically rather than by myth, with innovative tools.

What it is

Emery Berger's CppCon 2020 plenary on why performance is hard on modern hardware after the end of Dennard scaling. It covers benchmarking pitfalls and introduces new profiling tools for finding real bottlenecks.

Recommended by 2 HN commenters across 2 different months, 2021 to 2022.

What Hacker News said

Recommends jiggawatts · 2021-06 · on “Beware of Tight Feedback Loops (2020)”

This guy has had a few talks at CppCon over the years, and covers the basics of how to attempt benchmarking with actual computer science instead of myth and voodoo rituals: [this video] In practice, it's not critical to go that far. In my experience, huge performance wins are trivial to benchmark with just a modicum of effort, and tiny performance wins are typically not worth any effort at all. At FAANG scale they might be, but I don't work at a FAANG, so not my problem! :) Simple methods I use and can recommend are: - Ideally, collect data from production, where the change behaves exactly as it would in production because it is production! - Interleave tests on the same machine. E.g.: A, B, A, B

Recommends captaincrowbar · 2022-01 · on “Finding your home in game graphics programming”

The term you're looking for might be "abstraction penalty". For tools that can identify where the bottlenecks are, I recommend watching Emery Berger's talk "Performance Matters" from CppCon 2020 (either of the two links below should work). He introduces some innovative new profiling tools for this sort of analysis. [this video] [LINK]

Cites vanderZwan · 2021-04 · on “Surprisingly Slow”

To give an oversimplified answer, that depends on how things are connected and synchronized. You know how bottlenecks are often explained using funnels in real life? Imagine two funnels, one directly connecting to another one. In that case, the effective rate of flow is determined by the funnel which has the smallest tip - the fact that the larger one lets through fluid quicker is irrelevant, as it is slowed down by the smaller one (we're obviously ignoring things like funnels potentially overflowing here, this is a simplified scenario). So then the bottleneck is easy to pin-point, but also it immediately becomes obvious that widening one funnel beyond the size of the other has no effect. No