Landing: a6ffae6d7f0f
Project / Subsystem
gcc / libstdc++
Date
2026-04-30
Author
Jonathan Wakely
Commit
a6ffae6d7f0fb4515103a5f056b691301988268d
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- a6ffae6d7f0fb4515103a5f056b691301988268d
- source_type
- github
- headline
- libstdc++: Use hardware_destructive_interference_size in atomic.cc.
- tldr
- The libstdc++ now uses `std::hardware_destructive_interference_size` for aligning atomic variables to improve performance.
- author
- Jonathan Wakely
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • C++
- • atomic
- • performance
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-04-30T00:00:00.000Z
The libstdc++ now uses std::hardware_destructive_interference_size to align atomic variables in atomic.cc. This improves performance by reducing false sharing between threads. The code was moved from a header into the library, making it possible to use std::hardware_destructive_interference_size directly.