Add a cross-encoding version of strcmp, use it in bridged String equality, and expose it for Foundation's use#87271
Add a cross-encoding version of strcmp, use it in bridged String equality, and expose it for Foundation's use#87271Catfish-Man wants to merge 7 commits intomainfrom
Conversation
…lity, and expose it for Foundation's use
|
@swift-ci please test |
| @@ -702,6 +702,41 @@ internal func _SwiftCreateBridgedString_DoNotCall( | |||
| } | |||
| } | |||
|
|
|||
| @c public func _unicodeBuffersEqual( | |||
There was a problem hiding this comment.
Does this need to be @_spi too? I should verify that those interact in the way I hope
| return true | ||
| } | ||
|
|
||
| internal func isEqual<LHSEncoding: _UnicodeEncoding, RHSEncoding: _UnicodeEncoding>( |
There was a problem hiding this comment.
I should probably name this something less intrusive if I'm going to leave it as a free function
|
@swift-ci please Apple Silicon benchmark |
|
@swift-ci please test |
|
@swift-ci please Apple Silicon benchmark |
|
@swift-ci please test |
|
@swift-ci please Apple Silicon benchmark |
|
@swift-ci please test |
|
@swift-ci please Apple Silicon benchmark |
|
@swift-ci please test |
|
Benchmark results looked decent. 17% or so win for bridged string equality, which tests a bunch of other cases, and with this only partly adopted :) |
|
@swift-ci please test |
|
@swift-ci please Apple Silicon benchmark |
|
@swift-ci please test |
|
@swift-ci please Apple Silicon benchmark |
No description provided.