Closed jrflat closed 1 month ago
Improved some String+Path functions' performance with the following changes:
.utf8
UInt8._slash
.deletingPathComponent
.removingDotSegments
UInt8
Non-implementation related:
var input
utf8
UInt8._dot
._slash
Results: We generally see 2-6x speedup in the respective functions.
Old vs New String
String
NSString vs String
NSString
@swift-ci please test
Improved some String+Path functions' performance with the following changes:
.utf8
where applicable (such as when searching for asciiUInt8._slash
, which happens a lot).deletingPathComponent
didn't skip over consecutive trailing slashes.removingDotSegments
to directly modify the String bufferUInt8
arraysNon-implementation related:
var input
withutf8
to avoid confusionUInt8._dot
and._slash
instead of re-defining them in-functionResults: We generally see 2-6x speedup in the respective functions.
Old vs New
String
NSString
vsString