Re:C++11 FAQ
by MichaelMoser123 on Saturday January 28, 2017 @09:11PM
(#13511369)
just be careful with those ref counted pointers: shared_ptr/weak_ptr introduce a lot of atomic variable access. if you use them from a single thread then that's pure overhead.
[ Parent
| on HN ]
Re:C++11 FAQ
by banachtarski on Tuesday January 31, 2017 @02:54AM
(#13528611)
Yes, of course. A big chunk of my time at various previous companies was removing usage of such things when not necessary. It's also not "a lot" of atomic variable access but you do need a strong fence to provide the correct semantics (so it is some). To what degree "a lot" or "some" is depends obviously on what you're doing.