CppCon 2017: Chandler Carruth “Going Nowhere Faster”

CppCon · 113K views · 2017 · 1:00:58

Open on YouTube

Software performance & optimizationC, C++, Rust, Go & systems languagesComputer architecture & CPUstalk

Why Hacker News recommends it

Recommended as the best presentation on how modern CPUs run code, and why speculative execution matters for performance.

What it is

Chandler Carruth shows how to squeeze more performance out of already-optimized C++ code, covering how the CPU executes it. The talk goes into pipelining, branch prediction and speculative execution using benchmarks.

Recommended by 2 HN commenters across 3 different months, 2017 to 2026.

What Hacker News said

Strong rec inetknght · 2026-04 · on “Visualizing CPU Pipelining (2024)”

The best presentation I've seen about CPU performance related to pipelining, branch prediction, and speculative execution was Chandler Carruth's "Going Nowhere Faster" presentation at CppCon 2017 [0]. I do recommend watching the whole presentation, but if you watch nothing else then just watch the 5 minutes or so from the linked timestamp. [0]: [this video]

Recommends inetknght · 2017-12 · on “Intel i7 loop performance anomaly (2013)”

Disclaimer: I am not an expert and have not measured. This is armchair theory. But, I would argue two things. First, the former appears to have at least one unaligned arithmetic: > 400538: mov 0x200b01(%rip),%rdx # 601040 <counter> ...while the latter's equivalent instruction is 4-byte aligned: > 40057d: mov 0x200abc(%rip),%rdx # 601040 <counter> So, I would argue that's the biggest source of _speedup_ in the second case. However, I'm really interested in whether that's true since I don't see a memory fence; so the memory should be in L0 cache for both cases; I have trouble believing that an unaligned access can be so much slower with the data in cache. As for the `callq` to `repz retq`, I w

Recommends pkaye · 2018-11 · on “Researchers discover seven new Meltdown and Spectre attacks”

Chandler Carruth has a good talk with an example of why speculative execution is critical for performance. [this video] It starts around 36m13s time frame.

Cites jasode · 2018-06 · on “DevTube: Searchable index of developer videos”

>The YouTube inteface says "auto-generated" Ok, I never noticed that. I just read the captions and assumed obvious misspellings were auto-generated. For example in this video[1], the caption text is "L1D cache misses" but he's actually saying "L1-dcache misses" . (The Linux terminal screen he's showing does display "L1-dcache" .) Even though that video is not labeled as "auto-generated", I assumed it was because of the bad caption. Based on your info, I guess CppCon uses humans like Mechanical Turk or other non-domain typists to manually add the captions. [1] [this video]

Cites mathiasgredal · 2023-12 · on “Ubuntu 24.04 LTS will enable frame pointers by default”

Sure, but wouldn’t it make sense to extend the instruction set to allow the compiler to use these registers instead of reserving them for speculative / out-of-order execution? It was just a thought i had after watching a talk by a compiler guy: [this video]