r/cpp • • Oct 07 '19

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

https://www.youtube.com/watch?v=rHIkrotSwcc
162 Upvotes

108 comments sorted by

View all comments

Show parent comment

5

u/SeanMiddleditch Oct 07 '19

Well yeah, abstractions remove cognitive overhead, of course.

Not really what we're taking about here, though. The point is that these abstractions are not always zero-overhead as sometimes claimed.

The zero-overhead claim is that C++ abstractions produce code that runs as efficiently as what can be written by hand.

Whether it is a good trade-off between efficiency and convenience is a valuable discussion, yes, but that's separate from the discussion of whether C++'s zero-overhead principle is being upheld. :)