Boost logo

Boost :

From: Catalin Marinas (catalin.marinas_at_[hidden])
Date: 2006-01-10 11:33:53


"David Maisonave" <dmaisonave_at_[hidden]> wrote:
> In fact, even the copy_ptr was twice as fast as the boost::shared_ptr
> and cow_ptr in populating the container.
>
> It seems reference counting has a much bigger impact on performance than
> I had anticipated.

It might not be the reference counting itself but more the fact that
shared_ptr needs to allocate the counter object using "new" for every
created object. Using intrusive_ptr instead would avoid this issue. It
might also make a difference if you have BOOST_SP_USE_QUICK_ALLOCATOR
defined.

-- 
Catalin

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