[libcxx-commits] [libcxx] Optimize __insert_with_sentinel Function in std::vector (PR #113768)

Peng Liu via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 5 08:38:25 PST 2024


================
@@ -1360,27 +1360,27 @@ vector<_Tp, _Allocator>::__insert_with_sentinel(const_iterator __position, _Inpu
   for (; this->__end_ != this->__end_cap() && __first != __last; ++__first) {
----------------
winner245 wrote:

There are currently no benchmarks available for `vector::insert` and `vector::assign` in `libcxx/test/benchmarks/vector_operations.bench.cpp` (current benchmarks mainly focused on various constructors of `std::vector`). I will add relevant benchmarks and and share the before/after performance comparisons once I have the results.

https://github.com/llvm/llvm-project/pull/113768


More information about the libcxx-commits mailing list