Landing: 79e29562907b

Project / Subsystem

gcc / libstdc++

Date

2026-02-26

Author

Avi Kivity

Commit

79e29562907b454cdb867195b34cf63156d2d0cc

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
commit_hash
79e29562907b454cdb867195b34cf63156d2d0cc
source_type
github
headline
libstdc++: Optimize std::uninitialized_move to use memcpy when possible.
tldr
`std::uninitialized_move` and `std::uninitialized_move_n` are optimized to use `memcpy` when iterators are pointers, improving performance.
author
Avi Kivity
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • libstdc++
  • optimization
  • memory
discussion_id_link
bugzilla_pr
date
2026-02-26T00:00:00.000Z

std::uninitialized_move and std::uninitialized_move_n in libstdc++ are now optimized to use memcpy when the iterators are raw pointers. Previously, the optimization was missed because the move iterator wasn’t unwrapped before calling std::uninitialized_copy. This change improves performance when moving POD types.