Re: [PATCH] PR libstdc++/81476 Optimise vector insertion from input iterators

2017-07-20 Thread Jonathan Wakely
On 19/07/17 22:19 +0200, Marc Glisse wrote: On Wed, 19 Jul 2017, Jonathan Wakely wrote: The PR shows a fairly pathological case where ranges of InputIterators are repeatedly inserted at the start of a vector. Each insertion from an InputIterator moves every element after the insertion point by

Re: [PATCH] PR libstdc++/81476 Optimise vector insertion from input iterators

2017-07-19 Thread Marc Glisse
On Wed, 19 Jul 2017, Jonathan Wakely wrote: The PR shows a fairly pathological case where ranges of InputIterators are repeatedly inserted at the start of a vector. Each insertion from an InputIterator moves every element after the insertion point by a single position. So if we insert 1000 eleme

[PATCH] PR libstdc++/81476 Optimise vector insertion from input iterators

2017-07-19 Thread Jonathan Wakely
The PR shows a fairly pathological case where ranges of InputIterators are repeatedly inserted at the start of a vector. Each insertion from an InputIterator moves every element after the insertion point by a single position. So if we insert 1000 elements at the start we move each existing element