[libcxx-commits] [libcxx] Optimize __assign_with_sentinel in std::vector (PR #113852)

Peng Liu via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 12 08:09:28 PST 2024


================
@@ -69,6 +69,10 @@ Improvements and New Features
 - The ``_LIBCPP_ABI_BOUNDED_ITERATORS_IN_STD_ARRAY`` ABI configuration was added, which allows storing valid bounds
   in ``std::array::iterator`` and detecting OOB accesses when the appropriate hardening mode is enabled.
 
+- The `assign(_InputIterator, _InputIterator)` function of `std::vector<_Tp, _Allocator>` has been optimized for
+  non-trivial element types, such as `std::vector<std::string>`, with a performance improvement of up to 2.3x. The
+  performance for trivial types, such as `std::vector<int>`, remains similar or shows slight improvements.
----------------
winner245 wrote:

I will update the release note after all other comments have been addressed. By that time, I will be in a better position to make the update.

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


More information about the libcxx-commits mailing list