Re:Starting a tech startup with C++
by petke on Saturday January 02, 2016 @01:27PM
(#10827167)
Many programmers have this idea. Oh, this is a big object. I better wrap it in a smart pointer to avoid doing expensive copies when I pass it around. They do it as an optimisation. However because of named return value optimisation and move constructors no expensive copies are done when passing stack values to and from functions. Using smart pointers is actually slower (because of the indirection and reference counting).
[ Parent
| on HN ]
There are no comments on this comment yet.