Landing: 63f3f898bbfd

Project / Subsystem

gcc / libstdc++

Date

2026-08-21

Author

Yuao Ma

Commit

63f3f898bbfda3678b28ebf923bda5282b4ae654

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
—
commit_hash
63f3f898bbfda3678b28ebf923bda5282b4ae654
source_type
github
headline
libstdc++: Optimize ranges::for_each for segmented iterators
tldr
Optimizes std::for_each for segmented iterators, improving performance.
author
Yuao Ma
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • libstdc++
  • • optimization
  • • iterator
discussion_id_link
—
bugzilla_pr
—
date
2026-08-21T00:00:00.000Z

This change optimizes the std::for_each algorithm when used with segmented iterators. Similar to a previous optimization for std::ranges::for_each, this update specifically targets the std::for_each implementation. The naive for-loop logic has been separated and optimized for segmented iterators. A performance benchmark for ranges::for_each has also been added to the test suite.