Landing: 2d11dfb0e2ed
Project / Subsystem
gcc / libstdc++
Date
2026-08-03
Author
Yuao Ma
Commit
2d11dfb0e2edd9e3ea451987b844c76b12bb09af
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- 2d11dfb0e2edd9e3ea451987b844c76b12bb09af
- source_type
- github
- headline
- libstdc++: Optimize std::for_each for segmented iterators
- tldr
- Optimizes `std::for_each` to handle segmented iterators more efficiently, reducing overhead.
- author
- Yuao Ma
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • optimization
- • stl
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-03T00:00:00.000Z
The standard C++ library’s std::for_each algorithm has been optimized to better handle segmented iterators. This change splits the naive for-loop implementation from the more specialized logic for segmented iterators, improving performance by reducing unnecessary overhead when dealing with such iterator types.