Boost logo

Boost :

Subject: Re: [boost] [Block Pointer] benchmark
From: Nevin Liber (nevin_at_[hidden])
Date: 2011-05-25 19:07:01


On 25 May 2011 17:40, Phil Bouchard <philippe_at_[hidden]> wrote:

> On 5/25/2011 3:27 PM, Nevin Liber wrote:
>
>>
>> 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.
>>
>
> Well if you have a direct assignment coming from operator new then the
> pointer can be transferred directly into a register. If you have temporary
> r-values to copy it into then the transfer will be done from one memory
> location to another, but it won't be a fast as a register-to-register
> transfer.

And why do you believe that is *slower* (by almost 2.5x with your original
numbers) than a heap allocation from the standard heap? Because that is
what you keep asserting...

-- 
 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