Boost logo

Boost :

Subject: Re: [boost] [review] The review of Boost.DoubleEnded starts today: September 21 - September 30
From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2017-10-03 07:58:11


Den 03-10-2017 kl. 00:02 skrev Benedek Thaler via Boost:
> On Mon, Oct 2, 2017 at 7:30 PM, Thorsten Ottosen <tottosen_at_[hidden]>
> wrote:
>
>> Hi,
>>
>> Some more points to consider. I tried comparing push_back/unsafe_push_back
>> a little. I don't see any performance speedup on my system if the loop body
>> is just the push_back. If I make the loop a little more complicated than
>> just a push_back, I get some differences:
>>
>> Hi,
>
> My concern with the above benchmark, is that it does not compare the same
> thing: it calls reserve here but not there (std::deque and
> boost::container::deque have no reserve).

Well, true. But since the unsafe_push_back on batch_deque needs to be
preceded by a reserve, it would not be fair to exclude that.

> I tried a similar test, comparing devector/vector/container.vector
> unsafe_push_back/push_back, using google benchmark. See the code attached.
> This is how I run it:

what is container.vector?

Also, the file you attached uses batch_deque and std::vector, you test
mentions 3 types ..

kind regards

Thorsten


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