diff options
| author | Andrea Canciani <ranma42@gmail.com> | 2019-12-11 21:24:35 +0100 |
|---|---|---|
| committer | Andrea Canciani <ranma42@gmail.com> | 2019-12-11 21:24:35 +0100 |
| commit | cc863f02a307f4aad3e3d207b57ea10263007a08 (patch) | |
| tree | 068d71539de8d3bb4b69f165961a6473604757f9 /src/test/debuginfo/enum-thinlto.rs | |
| parent | ddca1e09c36a6ce21d95fec1619f23ba59b69c8a (diff) | |
| download | rust-cc863f02a307f4aad3e3d207b57ea10263007a08.tar.gz rust-cc863f02a307f4aad3e3d207b57ea10263007a08.zip | |
Improve `str` prefix/suffix comparison
The comparison can be performed on the raw bytes, as the chars can only match if their UTF8 encoding matches. This avoids the `is_char_boundary` checks and translates to a straight `u8` slice comparison which is optimized to a memcmp or inline comparison where appropriate.
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions
