Boost logo

Boost :

Subject: Re: [boost] [container] boost::container::vector, hybrid_vector, and performance
From: Vadim Stadnik (vadimstdk_at_[hidden])
Date: 2013-02-13 03:15:35


On Wed, Feb 13, 2013 at 10:14 AM, Adam Wulkiewicz <adam.wulkiewicz_at_[hidden]
> wrote:

 I saw that varray has some optimizations for trivial types (dispatching
>> to memcpy) that boost::container misses. Maybe a fairer comparison would
>> be to use a simple class instead of std::size_t as the basic type.
>> Something like "copyable_int" in boost/libs/container/movable_**int.hpp:
>>
>
> In my test non-POD types were stored in containers, i.e. Box and
> std::pair<Box, ptr> where Box is box<point<double, 2, cartesian> >.
>
>
For non-POD types locality of reference has quite significant effect on
results of performance tests. Access to values through pointers is more
costly against POD values. Non-POD types hardly can be useful for reliable
performance measurements even for containers with small number of elements.
The size of a single element std::pair<Box,ptr> is another factor that
should have an effect on performance.

Regards,
Vadim Stadnik


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