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? 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. Thanks in advance Thorsten