Boost logo

Boost :

Subject: Re: [boost] [Block Pointer][Container] Works - Take 2
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-03-05 22:59:34


On 03/05/2016 08:22 PM, Phil Bouchard wrote:
> On 03/05/2016 10:30 AM, Phil Bouchard wrote:
>>
>> The code is much cleaner "but" since it allocates more proxies, despite
>> using the fast pool allocator, that still slows down the overall
>> performance:
>>
>> make:
>> auto_ptr: 26164754 ns
>> shared_ptr: 27554248 ns
>> block_ptr: 144391600 ns
>>
>> new:
>> auto_ptr: 22210062 ns
>> shared_ptr: 46869206 ns
>> block_ptr: 138204822 ns
>
> I am able to speed it up to this point but the code is starting to be
> complex (by embedding the block_proxy into the block_base).
>
> make:
> auto_ptr: 28222750 ns
> shared_ptr: 29540799 ns
> block_ptr: 72347968 ns
>
> new:
> auto_ptr: 23409250 ns
> shared_ptr: 52830258 ns
> block_ptr: 66239225 ns

Believe it or not, I made a mistake in the fast_pool_allocator which
allocates proxies. I wasn't using unitary size which was clogging the
allocator. I fixed it and now block_ptr<> is *faster* than shared_ptr<>:

make:
auto_ptr: 25637845 ns
shared_ptr: 26789342 ns
block_ptr: 50487376 ns

new:
auto_ptr: 23139888 ns
shared_ptr: 48198668 ns
block_ptr: 39151845 ns


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