CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”
What it is
Chandler Carruth argues in a CppCon 2019 talk that C++ has no truly zero-cost abstractions. Using examples like unique_ptr, ABI constraints and compile-time costs, he shows that abstractions cost runtime, compile time or human effort.
Why Hacker News recommends it
HN commenters cite it whenever zero-cost abstraction claims come up, especially for why unique_ptr is not free on some ABIs.
- 7 people recommended it
- 7 different months
- 1 strong recommendations
- first 2020, last 2026
What HN commenters said
“Chandler presents his point clearly and goes deep enough into the subject.”
Clear presentation that goes deep into the subject.
metalrain, 2022-03 · Strong recommendation · in “Tech talks don’t have to be boring”
“See for a nice expose on this.”
Expose on why unique_ptr is not zero-cost.
blux, 2020-02 · Recommendation · in “Move, simply”
“I just wanted to mention this talk about how "zero-cost abstraction" is an idealism, not necessarily a reality”
Talk on zero-cost abstraction as idealism, not reality.
mehrdadn, 2020-09 · Recommendation · in “The problem with C”
“It's from this talk, which is about how a large amount of generated protocol buffer code at Google led to a quadratic increase in compile times”
Explains quadratic compile times from generated code at Google.
tylerhou, 2020-10 · Recommendation · in “The AMD Radeon Graphics Driver Makes Up Roughly 10.5% of the Linux Kernel”
“he makes a convincing point”
Makes a convincing point that no abstraction is zero cost.
CountHackulus, 2021-08 · Recommendation · in “When zero cost abstractions aren't zero cost”
“You should watch Titus Winters' presentation on this topic”
Compares assembly showing unique_ptr overhead from ABI.
kccqzy, 2022-09 · Recommendation · in “C++20, How Hard Could It Be”
“everything he says seems entirely solid”
Explains unique_ptr overhead and ABI constraints.
TwentyPosts, 2023-07 · Recommendation · in “Scope-based resource management for the Linux kernel”
Excerpts from Hacker News comments, linked to the originals. Summaries and labels were written by a language model from those comments.
Topics: c++, zero-cost abstractions, unique_ptr, abi, compilers, performance
Also recommended by the same people
commentaryApple's Independent Repair Program is a useless PR stunt.Louis Rossmann · 3 HN recommenders · 2020–2021
explainerWhy Machines That Bend Are BetterVeritasium · 3 HN recommenders · 2019–2021
talkTom Chi: How to Address our Carbon Debt to Heal the PlanetForesight Institute · 2 HN recommenders · 2019–2022
documentaryKedi - Full Length Documentaryvlogbrothers · 3 HN recommenders · 2018–2022
talk[#36] Zig Roadmap 2024 - Andrew KelleyZig SHOWTIME · 1 HN recommender · 2024–2025
talkKeynote: The Last Hope for Scala's Infinity War - John A. De GoesScalapeño · 2 HN recommenders · 2018–2021
talkCppCon 2015: Andrei Alexandrescu “std::allocator...”CppCon · 7 HN recommenders · 2017–2025
talkLexical Scanning in Go - Rob PikeGoogleFOSSSydney · 13 HN recommenders · 2012–2025