Boost logo

Boost :

Subject: Re: [boost] [block_ptr] 20% speed boost
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-02-16 21:03:40


On 02/16/2016 07:18 PM, Phil Bouchard wrote:
> On 02/16/2016 07:09 PM, Phil Bouchard wrote:
>> > If I try out the latest modifications and I disable the threads
>> then on
>> > Linux I have:
>> >
>> > make:
>> > auto_ptr: 2458626 ns
>> > shared_ptr: 2685224 ns
>> > block_ptr: 28300624 ns
>> >
>> > new:
>> > auto_ptr: 2383605 ns
>> > shared_ptr: 4992185 ns
>> > block_ptr: 7979659 ns
>>
>> So I just added a specialization of the pool for GCC x86 and now
>> block_ptr<> speeds up by 20%:
>>
>> make:
>> auto_ptr: 2511658 ns
>> shared_ptr: 2695469 ns
>> block_ptr: 22547960 ns
>>
>> new:
>> auto_ptr: 2369312 ns
>> shared_ptr: 4991352 ns
>> block_ptr: 6443925 ns
>
> I mean there is not much difference in speed with shared_ptr<> (30%),
> given that extra functionality.

I meant: the difference with shared_ptr<> is now 4% only!

make:
auto_ptr: 2506308 ns
shared_ptr: 2724499 ns
block_ptr: 22399555 ns

new:
auto_ptr: 2365577 ns
shared_ptr: 4953712 ns
block_ptr: 5193647 ns

Also the system pool is now passed as a template parameter if you wish
to change the one provided.


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