| ||||
| Comment on GotW #91 Solution: Smart Pointer Parameters by Herb Sutter
Edited 2013-12-03 to implement private feedback from Andrei Alexandrescu: Rewrote parts of the solution to #1 to make a correction (remove the comment about increment being cheap, as there overhead and it does incur a fence on x86/x64) and add the following new explanatory paragraph to drive home an essential point made again later on: New text: “As we will see, an essential best practice for any reference-counted smart pointer type is to avoid copying it unless you really mean to add a new reference. This cannot be stressed enough. This directly addresses both of these costs and pushes their performance impact down into the noise for virtually all applications, and especially eliminates the second cost because it is an antipattern to add and remove references in tight loops.” Thanks, Andrei! Read More » | ||||
| | ||||
| ||||
Tuesday, December 3, 2013
FeedaMail: Comments for Sutterâs Mill
Subscribe to:
Comments (Atom)