Boost logo

Boost :

Subject: Re: [boost] [devector] optimum growing/insertion policy
From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2017-11-02 17:55:38


Den 26-10-2017 kl. 17:08 skrev Thorsten Ottosen via Boost:
> Den 18-10-2017 kl. 16:37 skrev Joaquin M López Muñoz via Boost:

>>> In my opinion, the best option is to do 1 or 2 depending on which of the
>>> two subsequences BB···B and FF···F is smaller (respectively), which
>>> minimizes
>>> the number of movements. This is consistent with the expected
>>> behavior for
>>> push_[back|front]. 3 always implies more movements.
>
> Agreed, in a move-minimizing policy, one would want erase to do the
> least work.

There is one thing which might affect things for trivially copyable
types I expect move() to be faster than move_backwards(). Just guessing
though.

-T


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