HackerTube.dev

CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”

CppCon · 147.1K views · 2019-10-07 · 59:53

Open on YouTube ↗

If playback is restricted in your region, try opening the original video. Use Mark watched to add it to your marked videos.

Overview

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.

On Hacker News

HN commenters cite it whenever zero-cost abstraction claims come up, especially for why unique_ptr is not free on some ABIs.

Recommended by 7 HN people across 7 months · HN mentions 2020–2026

Topics

Search by tags

What people said

metalrain · 2022-03 · Strong recommendation

Yes, tech talks don't need to be boring and I agree on many points on the post. But also not just 12 slides, more like hundreds of slides. One example I have is Chandler Carruths talk in CppCon 2019 "There Are No Zero-cost Abstrations" [VIDEO] Chandler presents his point clearly and goes deep enough into the subject.

Read the original HN comment ↗
TwentyPosts · 2023-07 · Recommendation

When it comes to the overhead issues of unique_ptr, I always think of this video here: [VIDEO] At 26:50 he gets into how this relates to ABI, and how 'fixing' some of this would require a pretty severe ABI change, as well as destructive move semantics, which would require a severe change to how C++ works. I frankly don't understand C++ well enough to fully judge about all of this, but everything he says seems entirely solid, and showcases how unique_ptr is in fact not zero-cost, and can in fact be a significant performance trade-off when you really need that extra bit of performance. > Rust occasionally forces my hand considerably harder (e.g. RC<RefCell<..>> vs std::shared_ptr<>)) in the direction of performance compromise. How so? Is RC<RefCell<T>> more expensive than std::shared_ptr<T>?

Read the original HN comment ↗
kccqzy · 2022-09 · Recommendation

> std::unique_ptr<Foo> doesn't have any overhead over Foo* in code where semantics is the same Not true. And you just refuted yourself by being up the ABI question. You should watch Titus Winters' presentation on this topic where he compiles code using unique_ptr and raw pointers, compares the assembler produced, and explains why unique_ptr has non-zero overhead. The overhead is indeed coming from the ABI. Google has been wanting the next C++ to break ABI but they didn't get enough votes in the standard committee. [VIDEO]

Read the original HN comment ↗

Sources

Video by CppCon, played through YouTube.

Data and selection notes

HN summaries and labels may contain AI errors. HN dates refer to discussions, not video publication.

HN Library: HackerTube export (2026-10-31) and open-index/hacker-news. Upstream summaries and classifications may contain AI errors.

Views, duration and playback status refresh separately from the published catalog. When an update fails, existing data remains visible.

Selection checks
  • SaaS & AI candidates: Topic keywords do not match
  • Editor-approved picks: Editorial review is required

Rule matches identify candidates. They do not guarantee video quality or financial results.

About the library and its sources