mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Reimplement the CF stub system using ObjC. The primary effect of this is to break the link-time dependency on the CF symbols, but it also improves performance a bit.
One additional tweak (setting the scalar-aligned bit on foreign indices) had to be made to avoid a performance regression for long non-ASCII foreign strings.
This commit is contained in:
@@ -146,7 +146,7 @@ extension _AbstractStringStorage {
|
||||
|
||||
// CFString will only give us ASCII bytes here, but that's fine.
|
||||
// We already handled non-ASCII UTF8 strings earlier since they're Swift.
|
||||
if let otherStart = _cocoaUTF8Pointer(other) {
|
||||
if let otherStart = _cocoaASCIIPointer(other) {
|
||||
//We know that otherUTF16Length is also its byte count at this point
|
||||
if count != otherUTF16Length {
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user