Boost logo

Boost :

Subject: Re: [boost] [container] boost::container::vector, hybrid_vector, and performance
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2013-02-13 06:26:51


El 13/02/2013 9:25, Andrey Semashev escribió:
> On Wed, Feb 13, 2013 at 1:38 AM, Ion Gaztañaga <igaztanaga_at_[hidden]> wrote:
>>
>> I saw that varray has some optimizations for trivial types (dispatching to
>> memcpy) that boost::container misses.
>
> Shouldn't a decent STL implementation do that automatically? AFAIR,
> STLPort's std::copy would resort to memcpy when possible. Don't other
> implementations do the same thing?

The problem is that Boost.Container constructs objects using
allocator_traits, and the STL has no algorithms for that.
Boost.Container should improve these internal algorithms with some
type_traits-based dispatching (trivial types, non-throwing operations,
etc.).

Best,

Ion


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