You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [String] Fix corner case in comparison fast-path. (#20937)
When in a post-binary-prefix-scan fast-path, we need to make sure we
are comparing a full-segment scalar, otherwise we miss situations
where a combining end-of-segment scalar would be reordered with a
prior combining scalar in the same segment under normalization in one
string but not the other.
This was hidden by the fact that many combining scalars are not
NFC_QC=maybe, but those which are not present in any precomposed form
have NFC_QC=yes. Added tests.
* [String] Normalization-boundary-before UTF-8 fast path.
All latiny (<0x300) scalars have normalization boundaries before them,
so when asking if memory containing a scalar encoded in valid UTF-8
has a boundary before it, check if the leading byte definitely encodes
a scalar less than 0x300.
* [String] Refactor and fast-path normalization
Refactor some normalization queries into StringNormalization.swift,
and add more latiny (<0x300) fast-paths.
* [String] Speed up constant factors on comparison.
Include some tuning and tweaking to reduce the constant factors
involved in string comparison. This yields considerable improvement on
our micro-benchmarks, and allows us to make less inlinable code and
have a smaller ABI surface area.
Adds more extensive testing of corner cases in our existing
fast-paths.
* [String] Hand-increment loop variable for perf.
Hand-incrementing the loop variable allows us to skip overflow
detection, and will permit more vectorization improvements in the
future. For now, it gives us perf improvements in nano-benchmarks.
0 commit comments