[libcxx-commits] [libcxx] [libc++] Optimize ranges::{for_each, for_each_n} for segmented iterators (PR #132896)

Peng Liu via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 3 09:47:50 PDT 2025


================
@@ -60,6 +60,10 @@ Improvements and New Features
 
 - Updated formatting library to Unicode 16.0.0.
 
+- The ``std::ranges::for_each`` and ``std::ranges::for_each_n`` algorithms have been optimized for segmented iterators,
+  resulting in performance improvements of up to 21.3x for ``std::deque::iterator`` segmented inputs and 24.9x for
+  ``join_view`` of ``vector<vector<T>>``.
----------------
winner245 wrote:

Fixed.

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


More information about the libcxx-commits mailing list