淘沙TV
C、C++、Rust、Go 和系统语言

CppCon 2019:Chandler Carruth 谈「没有零成本的抽象」

原名:CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”
Iammyself001·YouTube 14.7 万次观看·B站 10 播放·1 年前·59:53
在 B 站打开 原 YouTube 版本

关于这个视频

Chandler Carruth 在 CppCon 2019 演讲中指出,C++ 没有真正的零成本抽象。他使用 unique_ptr、ABI 约束和编译时成本等示例表明,抽象会耗费运行时、编译时间或人力。

HN 为什么推荐它:每当出现零成本抽象声明时,HN 评论者都会引用它,特别是为什么 unique_ptr 在某些 ABI 上不是免费的。

“钱德勒清楚地表达了他的观点,并对这个主题进行了足够深入的探讨。”— HN 评论 · 2022 · 原文

查看英文原文

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 HN likes it: HN commenters cite it whenever zero-cost abstraction claims come up, especially for why unique_ptr is not free on some ABIs.

“Chandler presents his point clearly and goes deep enough into the subject.”

HN 提及 20 次推荐者 7 人首次 2020最近 2026质量分 7.5

原视频频道:CppCon · YouTube 14.7 万次观看

演讲深入常青c++零成本抽象唯一指针阿比编译器性能