
On Wed, Feb 13, 2013 at 10:14 AM, Adam Wulkiewicz <adam.wulkiewicz@gmail.com
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