|
Boost : |
Subject: Re: [boost] [review] The review of Boost.DoubleEnded starts today: September 21 - September 30
From: Benedek Thaler (thalerbenedek_at_[hidden])
Date: 2017-10-13 17:45:43
On Fri, Oct 13, 2017 at 7:28 PM, Thorsten Ottosen <tottosen_at_[hidden]>
wrote:
> Den 12-10-2017 kl. 22:18 skrev Benedek Thaler via Boost:
>
>> On Wed, Oct 11, 2017 at 6:39 PM, Thorsten Ottosen via Boost <
>>
>
> Here are my results of a similar test:
>>
>
> Hi Benedek,
>
> Many thanks!
>
> I'm just curious: why are the N's different for the two classes.
> For example, devector has 128, but not 8 or 64?
>
Forgot to change a constant.
> There is one final test I would like to see. Instead of relying on
> shuffled positions, we should keep the container size fixed and insert
> exactly one time at each position. So instead of
>
> for (std::size_t p : positions)
> {
> c.insert(c.begin() + p, p);
> }
>
> we should before the loop fill the container to 90% capacity. For
> devector, make sure there is space in both ends. Then do the following:
>
>
> for( std::size_t p = 0; p < c.size(); ++p )
> {
> state.ResumeTiming();
> c.insert( c.begin() + p, p );
> state.PauseTiming();
> c.erase( c.begin() + p );
> }
>
> That would be great to see even for small values 8, 16, 32, 64, 128, etc.
>
>
Here you are:
Run on (8 X 3500 MHz CPU s)
2017-10-13 19:42:26
***WARNING*** CPU scaling is enabled, the benchmark real time measurements
may be noisy and will incur extra overhead.
-------------------------------------------------------------
Benchmark Time CPU Iterations
-------------------------------------------------------------
devector_insert/8 6079 ns 6091 ns 114176
devector_insert/64 49051 ns 49162 ns 14195
devector_insert/512 409902 ns 410626 ns 1703
devector_insert/4096 4734707 ns 4740961 ns 147
devector_insert/32768 123148029 ns 123081746 ns 6
devector_insert/65536 442823644 ns 442517234 ns 2
cvector_insert/8 6133 ns 6138 ns 115351
cvector_insert/64 49637 ns 49692 ns 13908
cvector_insert/512 430861 ns 431102 ns 1626
cvector_insert/4096 6275393 ns 6277401 ns 111
cvector_insert/32768 218750948 ns 218571840 ns 3
cvector_insert/65536 825168625 ns 824351333 ns 1
(It'd be great if someone could re-run these tests to verify my results)
Thanks,
Benedek
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk