Boost logo

Boost :

Subject: Re: [boost] [Block Pointer] benchmark
From: Nevin Liber (nevin_at_[hidden])
Date: 2011-05-25 18:27:03


On 25 May 2011 16:23, Phil Bouchard <philippe_at_[hidden]> wrote:

>
> $ bin/benchmark.test/gcc-4.1.2/release/benchmark
> make:
> auto_ptr: 10980716 ns
> shared_ptr: 15384949 ns
> block_ptr: 118651908 ns
>
> new:
> auto_ptr: 4608425 ns
> shared_ptr: 10733654 ns
> block_ptr: 69710242 ns

You have yet to explain why your make_auto is so much slower than new
directly. It just isn't that expensive to copy one pointer and zero out
another. I can't imagine what else your code can possibly be doing. I
can't imagine how that can be more, let alone significantly more expensive
than a heap allocation. Enlighten me.

-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

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