Landing: fe3c9c98bf52
Project / Subsystem
gcc / libstdc++
Date
2026-05-08
Author
Dragon Archer
Commit
fe3c9c98bf52e1a01f903c3d685930019a57ce61
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- fe3c9c98bf52e1a01f903c3d685930019a57ce61
- source_type
- github
- headline
- libstdc++: Replace assert with __glibcxx_assert to reduce overhead.
- tldr
- Replaces `assert` with `__glibcxx_assert` in libstdc++ to reduce runtime overhead in release builds.
- author
- Dragon Archer
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • assert
- • debugging
- • performance
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-08T00:00:00.000Z
This commit replaces instances of the standard C assert macro with the libstdc++-specific __glibcxx_assert macro in ryu and debug.cc. Unlike assert, __glibcxx_assert is disabled in release builds, which avoids unnecessary runtime checks and reduces binary size. To avoid modifying third-party headers, the patch redefines assert to __glibcxx_assert when including ryu headers.