Boost logo

Boost :

Subject: Re: [boost] [Block Pointer] benchmark
From: Phil Bouchard (philippe_at_[hidden])
Date: 2011-05-24 19:23:36


On 5/24/2011 4:07 PM, Nevin Liber wrote:
>
> Your claim is " It is a fast as the popular smart pointer *
> boost::shared_ptr<T>*". Yet, in single-threaded code and shared_ptr using
> new instead of make_shared, block_ptr still takes 3.3x as long as
> shared_ptr.
>
> That is *a lot* of overhead...

Yes but this is a worse-case scenario because the assignment of a
pointer from the data segment that is the last one pointing to an object
on the heap will go thru more subroutines. If the pointer was already
on the heap then it'll be faster. What really matters is the constant
complexity.

But you're right on the docs I'll correct them.

My point is to optimize ordered_malloc() and is_from() and I was
wondering if there is any hope that can happen?

Thanks,
-Phil


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