Boost logo

Boost :

Subject: Re: [boost] [Block Pointer] benchmark
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-05-25 13:07:34


On 25/05/2011 18:11, Phil Bouchard wrote:
> On 5/25/2011 8:00 AM, Nevin Liber wrote:
>>
>> And what exactly is make_auto doing that is *much more* costly than a
>> heap
>> allocation? According to your numbers, it takes almost 2.5x longer than
>> just a new.
>
> The make factory functions create a temporary r-value which needs to be
> copied to the next l-value; this is why it is much slower.
>

Are you sure you're doing your benchmarks with -03?


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