stdlib/String: add a performance FIXME

Swift SVN r19394
This commit is contained in:
Dmitri Hrybenko
2014-07-01 13:18:18 +00:00
parent 124eb2ae83
commit 27abfcb271

View File

@@ -365,6 +365,9 @@ extension String : Collection {
++start
for ; start != end; ++start {
// 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'.
if segmenter.isBoundaryAfter(gcb0) {
break
}