Fields

hardware None
os None

Parameters

Fields

NameValue

Parameters

NameValue
git_commit commit 9827440f1e723423baf4c235e844eb8ac48a8f97
Author: Peng Liu <winner245@hotmail.com>
Date: Wed Jun 18 12:22:47 2025 -0400

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

Previously, the segmented iterator optimization was limited to `std::{for_each, for_each_n}`. This patch
extends the optimization to `std::ranges::for_each` and `std::ranges::for_each_n`, ensuring consistent
optimizations across these algorithms. This patch first generalizes the `std` algorithms by introducing
a `Projection` parameter, which is set to `__identity` for the `std` algorithms. Then we let the `ranges`
algorithms to directly call their `std` counterparts with a general `__proj` argument. Benchmarks
demonstrate performance improvements of up to 21.4x for ``std::deque::iterator`` and 22.3x for
``join_view`` of ``vector<vector<char>>``.

Addresses a subtask of #102817.
Filter

ldionne-old-macbook-results test results

Run Order Start Time Duration
Current 541452 2025-12-16T16:40:01 0:00:00
Previous 541451 2025-12-16T16:40:01 0:00:00
Baseline 485288 2025-12-16T16:40:01 0:00:00


Tests Summary

Status Group # # (B)
Performance Regressions 5 0
Performance Improvements 1 0
Added Tests 1 18
Unchanged Tests 83 72
Total Tests 90

Performance Regressions - execution_time Δ Previous Current σ Δ (B) σ (B)
734_vpr_r 2.18% 15.299 15.633 - 0.00% -
727_cppcheck_r 1.37% 24.827 25.168 - 0.00% -
766_femflow_r 1.16% 12.837 12.986 - 0.00% -
721_gcc_r 1.15% 12.964 13.114 - 0.00% -
731_astcenc_r 1.03% 10.042 10.146 - 0.00% -

Performance Improvements - execution_time Δ Previous Current σ Δ (B) σ (B)
748_flightdm_r -1.04% 9.048 8.954 - 0.00% -

Added Tests - execution_time
735_gem5_r

Added Tests - execution_time
706_stockfish_r
707_ntest_r
709_cactus_r
710_omnetpp_r
721_gcc_r
723_llvm_r
727_cppcheck_r
729_abc_r
731_astcenc_r
734_vpr_r
735_gem5_r
736_ocio_r
737_gmsh_r
748_flightdm_r
750_sealcrypto_r
753_ns3_r
766_femflow_r
767_nest_r


Report Time: 0.09s
Name Current %
706_stockfish_r 22.213 -
707_ntest_r 18.098 -
709_cactus_r 19.743 -
710_omnetpp_r 8.445 -
721_gcc_r 13.114 1.15%
723_llvm_r 11.537 -
727_cppcheck_r 25.168 1.37%
729_abc_r 18.849 -
731_astcenc_r 10.146 1.03%
734_vpr_r 15.633 2.18%
735_gem5_r 13.836 -
736_ocio_r 16.252 -
737_gmsh_r 13.072 -
748_flightdm_r 8.954 -1.04%
750_sealcrypto_r 18.525 -
753_ns3_r 10.764 -
766_femflow_r 12.986 1.16%
767_nest_r 14.262 -
Geometric Mean 14.436 -