"Performance Matters" by Emery Berger

Strange Loop Conference · 501K views · 2019 · 42:15

Open on YouTube

Software performance & optimizationTesting, debugging & developer toolstalk

Why Hacker News recommends it

It is the standard recommendation for anyone puzzled by unexplained benchmark changes from tiny code edits, and for learning about causal profiling.

What it is

Emery Berger explains why performance is hard to measure and deliver on modern hardware, showing how code layout and alignment can swamp optimization effects. He presents Stabilizer for statistically sound evaluation and Coz, a causal profiler.

Recommended by 12 HN commenters across 10 different months, 2019 to 2025.

What Hacker News said

Strong rec divan · 2019-12 · on “Ask HN: Best Talks of 2019?”

"Performance matters" by Emery Berger on StrangeLoop'19 is a great talk - [this video] Also, rest of his talks are also fascinating: - [LINK] - [LINK]

Strong rec jaybosamiya · 2020-01 · on “Measure code execution time accurately in Python”

I haven't had a chance to mess around with it much, but the coz-profiler [1] uses basically the same idea, but the other way around (i.e., slow down everything else to get a "virtual speedup") which helps quantify what the effect of optimizing some code would be. I learnt about this tool from Emery Berger's talk [2] on this (at strangeloop), which I highly recommend. Lots of really nice insight, even outside of this tool. [1] [LINK] [2] [this video]

Strong rec robocat · 2020-05 · on “The naked truth about writing a programming language (2014)”

Aside: this is the most amazing optimisation information I have seen: [this video] Unfortunate that it is a video... Summary: Modern CPUs have so many hidden causes of performance variation, that you require special tools to actually measure small performance gains. He finds an amazing but unobvious speed up in SQLite using the causal analysis tool they developed. And a surprising difference between -O2 and -O3 implying overfitting.

Strong rec acidbaseextract · 2020-12 · on “Ryzen 5800X vs. M1: Programming benchmarks”

I would highly recommend Emery Berger's talks [1] for anyone interested in benchmarking software. The alignment and code layout in memory that huayra mentions has shockingly large performance implications. [1] [this video]

Strong rec j-pb · 2023-06 · on “Poop: Performance Optimizer Observation Platform”

Nobody should do benchmarking like this anymore. Memory layout of your code has such a big impact on performance on modern computers that measuring performance without removing that variable leads to wild goose chases, where you think you improved something, but in reality you incidentally got the compiler to move the code around a bit. Emery Berger has an excelent talk on this [1], and a causal profiler that they developed called Coz[2]. Branch miss-predicts might be somewhat invariant to that, but still, one of the main points of the talk is that people do too much eyeball statistics, mistaking the variance of the underlying stochastic process with actual signal. Coz is pretty trivial to s

Recommends kristjansson · 2020-06 · on “C performance mystery: delete unused string constant”

This[1] talk from Emery Berger at last year's Strange Loop does a good job discussing the impact of alignment and other 'small' changes on performance, and how to estimate the actual impact of changes on performance [1]: [this video]

Recommends Twirrim · 2020-06 · on “C performance mystery: delete unused string constant”

It's mentioned elsewhere in this HN discussion, but I think I'd encourage watching this talk: [this video] . It's particularly relevant to what you're seeing.

Recommends vanderZwan · 2021-04 · on “Prefix Trees in Action”

Try getting them to watch this talk by Emery Berger: [this video] And who knows, maybe they'd even be interested in using coz afterwards: [LINK]