mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
stdlib: improve performance of string appending
CaptureProp , -21.8%
HeapSort , 12.7%
ImageProc , -25.6%
StrCat , 92.6%
StrComplexWalk , 11.1%
StrToInt , 16.6%
StringInterpolation , 21.6%
Regression in CaptureProp is due to some interference of the harness. When the
code is extracted into a separate file, there is no difference.
Regression in ImageProc is caused by unconditional construction of a string for
CheckResults()
rdar://18119872
Swift SVN r21535
This commit is contained in:
@@ -300,7 +300,7 @@ public func += (inout lhs: String, rhs: String) {
|
||||
lhs = rhs
|
||||
}
|
||||
else {
|
||||
lhs._core.extend(rhs._core)
|
||||
lhs._core.append(rhs._core)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user