{"push_id":618919120,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"088ed9fe946997f94682ee53d586b8c3d118e211","before":"bf9653d85f05b945ed5e2a79f1c93b16e064e054","commits":[{"sha":"088ed9fe946997f94682ee53d586b8c3d118e211","author":{"email":"96f164ad4d9b2b0dacf8ebee2bb1eeb3aa69adf1@efcs.ca","name":"Eric Fiselier"},"message":"[libcxx] Optimize vectors uninitialized construction of trivial types from an iterator range.\n\nSummary:\nIn certain cases vector can use memcpy to construct a range of elements at the back of the vector. We currently don't do this resulting in terrible code gen in non-optimized mode and a\nvery large slowdown compared to libstdc++. \n\nThis patch adds a `__construct_forward_range(Allocator, Iter, Iter, _Ptr&)` and `__construct_forward_range(Allocator, Tp*, Tp*, Tp*&)` functions to `allocator_traits` which act similarly to the existing `__construct_forward(...)` functions.\n\nThis patch also changes vectors `__construct_at_end(Iter, Iter)` to be `__construct_at_end(Iter, Iter, SizeType)` where SizeType is the size of the range. `__construct_at_end(Iter, Iter, SizeType)` now calls `allocator_traits<Tp>::__construct_forward_range(...)`. \n\nThis patch is based off the design of `__swap_out_circular_buffer(...)` which uses `allocator_traits<Tp>::__construct_forward(...)`.\n\nOn my machine this code performs 4x better than the current implementation when tested against `std::vector<int>`. \n\n\n\nReviewers: howard.hinnant, titus, kcc, mclow.lists\n\nReviewed By: mclow.lists\n\nSubscribers: cfe-commits\n\nDifferential Revision: http://reviews.llvm.org/D8109\n\ngit-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@233711 91177308-0d34-0410-b5e6-96231b3b80d8","distinct":true,"url":"https://api.github.com/repos/chapuni/libcxx/commits/088ed9fe946997f94682ee53d586b8c3d118e211"}]}