Subject: Re: [boost] devector feedback request
From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2015-07-27 09:46:10
> From the documentation, it sounds like a devector is strictly superior
> to std::vector, as it offers a superset of functionality. It would be
> great if you could discuss a bit more the trade-offs, for example, in
> which cases a devector is inferior to a std::vector performance-wise.
This comparison makes most sense if the two containers are configured in
a compatible way. That is, no internal buffer for devector and the same
eponential growth of the buffer.
In this senario one should expect std::vector to be superior by a very
small constant factor for many operations (so there is /never/ any
big-Oh advantage of std::vector). For example, to initialize a default
std::vector, you need to initialize three data members, whereas the
devector needs to initialize four data members. Similarly, devector
sometimes needs to adjust two members instead of one.
For many operations, I expect there will be very little difference, and
as soon as you start using stuff that a devector can do efficiently,
then devector code will perform much better.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk