PR libstdc++/81476 Optimise vector insertion from input iterators
authorJonathan Wakely <jwakely@redhat.com>
Wed, 19 Jul 2017 19:32:15 +0000 (20:32 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 19 Jul 2017 19:32:15 +0000 (20:32 +0100)
commit304a15ec643310a4d18521ca36fea5bfed814768
tree6d187a5210ebab0f62e67d23c11f87965ffb59f3
parent6cdcce60ff317b9a3feca930306194f110ed0171
PR libstdc++/81476 Optimise vector insertion from input iterators

PR libstdc++/81476
* include/bits/vector.tcc (vector::_M_range_insert<_InputIterator>):
Only insert elements one-by-one when inserting at the end.
* testsuite/performance/23_containers/insert/81476.cc: New.

From-SVN: r250366
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/vector.tcc
libstdc++-v3/testsuite/performance/23_containers/insert/81476.cc [new file with mode: 0644]