Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-01-12 12:11:19


On 01/12/2005 08:03 AM, Alexander Terekhov wrote:
[snip]
>
> Note that in the case of immutable managed objects, "use_count_.
> decrement()" can be replaced by msync::none version (decrement() is a
> shortcut for decrement(msync::acq, msync::rel) but increments are all
> "naked"). Msync on self_count_ can be relaxed a bit as well. This can
> make quite a difference in performance.

I'm a thread novice, so forgive me if this is dumb question, but why
are increments "naked" and what does "naked" mean?

One reason I'm interested is that IIUC, weighted reference counting
doesn't require any synchonization on increments, but does
require them on decrements. See the [lins*] references on:

http://www.cs.kent.ac.uk/people/staff/rej/gcbib/gcbibL.html

Thus, wouldn't weighted refcounts also make quite a difference in
performance?

However, the cost for the weights is 1 refcount for each
smart pointer, or something like that.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk