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
Thanks for reporting. It looks like we're spending a good chunk of time in String/Substring.subscript.getter
11.00 ms 84.6% 0 specialized _StringCompareOptionsIterable._range<A>(of:toHalfWidth:diacriticsInsensitive:caseFold:anchored:backwards:)
5.00 ms 38.5% 1.00 ms specialized Collection.first.getter
4.00 ms 30.8% 1.00 ms String.subscript.getter
3.00 ms 23.1% 1.00 ms Character.asciiValue.getter
2.00 ms 15.4% 1.00 ms Substring.subscript.getter
1.00 ms 7.7% 1.00 ms _stringCompareWithSmolCheck(_:_:expecting:)
I suppose that's here. I'm not sure what exactly is taking so long though from this trace though.
Description
String.range performs about 20 times slower than NSString(string: String).range for the same string
Reproduction
code
result
Expected behavior
String.range is at least as fast as NSString.range
Environment
sonoma 14.5
Additional information
No response
The text was updated successfully, but these errors were encountered: