mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Change all uses of x = x.successor() to use x._successorInPlace()
...because it is apparently more efficient in some cases. Technically we don't do this in ALL places, because it would be unfortunate if the implementation of _successorInPlace() were self recursive :-)
This commit is contained in:
@@ -143,9 +143,9 @@ extension String.CharacterView : CollectionType {
|
||||
|
||||
var gcb0 = graphemeClusterBreakProperty.getPropertyRawValue(
|
||||
unicodeScalars[start].value)
|
||||
start = start.successor()
|
||||
start._successorInPlace()
|
||||
|
||||
for ; start != end; start = start.successor() {
|
||||
for ; start != end; start._successorInPlace() {
|
||||
// FIXME(performance): consider removing this "fast path". A branch
|
||||
// that is hard to predict could be worse for performance than a few
|
||||
// loads from cache to fetch the property 'gcb1'.
|
||||
|
||||
Reference in New Issue
Block a user