Landing: efe87e59bdfb
Project / Subsystem
gcc / libcpp
Date
2026-08-19
Author
Wilco Dijkstra
Commit
efe87e59bdfb9ccf491360ad3a1ca1b836735ab6
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- libcpp
- patch_id
- —
- commit_hash
- efe87e59bdfb9ccf491360ad3a1ca1b836735ab6
- source_type
- github
- headline
- libcpp: Improve search_line_sve2 performance
- tldr
- Optimized `search_line_sve2` in libcpp for better performance and simpler code, especially with unaligned inputs.
- author
- Wilco Dijkstra
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libcpp
- • SVE
- • performance
- • optimization
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-19T00:00:00.000Z
The search_line_sve2 function in libcpp/lex.cc has been optimized to improve performance and code simplicity. Similar to its AdvSIMD counterpart, it now loops until a match is found, even with unaligned input pointers or when near the end of the buffer. This relies on CPP_BUFFER_PADDING being at least 256 bytes (the maximum SVE vector length) and assumes a match exists within the buffer. Performance testing shows a 1-2% improvement on a trace of libcpp calls.