[all-commits] [llvm/llvm-project] 09c266: [libc++] Optimize std::for_each_n for segmented it...

Peng Liu via All-commits all-commits at lists.llvm.org
Wed May 21 09:11:11 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 09c266b75db43665b090592782ec13757358a083
      https://github.com/llvm/llvm-project/commit/09c266b75db43665b090592782ec13757358a083
  Author: Peng Liu <winner245 at hotmail.com>
  Date:   2025-05-21 (Wed, 21 May 2025)

  Changed paths:
    M libcxx/docs/ReleaseNotes/21.rst
    M libcxx/include/CMakeLists.txt
    M libcxx/include/__algorithm/for_each_n.h
    A libcxx/include/__algorithm/for_each_n_segment.h
    M libcxx/include/__iterator/segmented_iterator.h
    M libcxx/include/module.modulemap.in
    A libcxx/test/benchmarks/algorithms/nonmodifying/for_each_n.bench.cpp
    M libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp

  Log Message:
  -----------
  [libc++] Optimize std::for_each_n for segmented iterators (#135468)

This patch enhances the performance of `std::for_each_n` when used with
segmented iterators, leading to significant performance improvements,
summarized in the tables below. This addresses a subtask of
https://github.com/llvm/llvm-project/issues/102817.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list