diff options
| author | bors <bors@rust-lang.org> | 2024-03-05 10:28:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-05 10:28:55 +0000 |
| commit | bdde2a80aef587cdbb8eb2d6e295d5c1d05830d9 (patch) | |
| tree | dc466492548dbb9388c10423a0b5c80a8d0119a4 /compiler/rustc_target/src/spec/base/avr_gnu.rs | |
| parent | 41d97c8a5dea2731b0e56fe97cd7cb79e21cff79 (diff) | |
| parent | 8eaaa6e610d92e2b29ef1cf46a796cc27c96428d (diff) | |
| download | rust-bdde2a80aef587cdbb8eb2d6e295d5c1d05830d9.tar.gz rust-bdde2a80aef587cdbb8eb2d6e295d5c1d05830d9.zip | |
Auto merge of #121138 - Swatinem:grapheme-extend-ascii, r=cuviper
Add ASCII fast-path for `char::is_grapheme_extended` I discovered that `impl Debug for str` is quite slow because it ends up doing a `unicode_data::grapheme_extend::lookup` for each char, which ends up doing a binary search. This introduces a fast-path for ASCII chars which do not have this property. The `lookup` is thus completely gone from profiles. --- As a followup, maybe it’s worth implementing this fast path directly in `unicode_data` so that it can check for the lower bound directly before going to a potentially expensive binary search.
Diffstat (limited to 'compiler/rustc_target/src/spec/base/avr_gnu.rs')
0 files changed, 0 insertions, 0 deletions
