New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] String performance optimizations #10223

Merged
merged 6 commits into from Jun 14, 2017

Conversation

Projects
None yet
5 participants
@dabrahams
Member

dabrahams commented Jun 13, 2017

Explanation: String optimizations
Scope: optimizations
Radar: rdar://32744663 String Optimizations for Swift 4 beta 3
Risk: very low
Testing: Passed full validation + benchmarking on master; validation and source compatibility on the 4.0 branch (benchmark testing on 4.0 branch not supported)

@dabrahams

This comment has been minimized.

Show comment
Hide comment
@dabrahams

dabrahams Jun 13, 2017

Member

@swift-ci Please test

Member

dabrahams commented Jun 13, 2017

@swift-ci Please test

@dabrahams

This comment has been minimized.

Show comment
Hide comment
@dabrahams

dabrahams Jun 13, 2017

Member

@swift-ci Please test source compatibility

Member

dabrahams commented Jun 13, 2017

@swift-ci Please test source compatibility

@dabrahams

This comment has been minimized.

Show comment
Hide comment
@dabrahams

dabrahams Jun 13, 2017

Member

@swift-ci Please benchmark

Member

dabrahams commented Jun 13, 2017

@swift-ci Please benchmark

@airspeedswift airspeedswift changed the title from String Optimizations for Swift 4 beta 3 to [4.0] String performance optimizations Jun 13, 2017

@dabrahams dabrahams requested review from milseman and moiseev Jun 13, 2017

}
}
/*

This comment has been minimized.

@moiseev

moiseev Jun 13, 2017

Member

Looks like a development process artifact. Should it be removed?

@moiseev

moiseev Jun 13, 2017

Member

Looks like a development process artifact. Should it be removed?

This comment has been minimized.

@dabrahams

dabrahams Jun 13, 2017

Member

Good catch. Yes, it should be removed, though since it's benign I'd rather do this in master as a separate thing and let it land in a release later.

@dabrahams

dabrahams Jun 13, 2017

Member

Good catch. Yes, it should be removed, though since it's benign I'd rather do this in master as a separate thing and let it land in a release later.

@swift-ci

This comment has been minimized.

Show comment
Hide comment
@swift-ci

swift-ci Jun 13, 2017

Contributor

Build comment file:

Build failed before running benchmark.


Contributor

swift-ci commented Jun 13, 2017

Build comment file:

Build failed before running benchmark.


@dabrahams

This comment has been minimized.

Show comment
Hide comment
@dabrahams

dabrahams Jun 13, 2017

Member

@shahmishal I don't understand the failure. Should we just run the benchmark again?

Member

dabrahams commented Jun 13, 2017

@shahmishal I don't understand the failure. Should we just run the benchmark again?

@shahmishal

This comment has been minimized.

Show comment
Hide comment
@shahmishal

shahmishal Jun 13, 2017

Member

Benchmark driver is written to only work with master branch

https://github.com/apple/swift/blob/swift-4.0-branch/benchmark/scripts/Benchmark_Driver#L292

if current_branch != 'master' and not os.path.isdir(master_branch_dir):
        print('Unable to find benchmark logs for master branch. Set a ' +
              'baseline benchmark log by passing --benchmark to ' +
              'build-script while on master branch.')
        return 1
Member

shahmishal commented Jun 13, 2017

Benchmark driver is written to only work with master branch

https://github.com/apple/swift/blob/swift-4.0-branch/benchmark/scripts/Benchmark_Driver#L292

if current_branch != 'master' and not os.path.isdir(master_branch_dir):
        print('Unable to find benchmark logs for master branch. Set a ' +
              'baseline benchmark log by passing --benchmark to ' +
              'build-script while on master branch.')
        return 1
@dabrahams

This comment has been minimized.

Show comment
Hide comment
@dabrahams

dabrahams Jun 14, 2017

Member

Locally-derived benchmark results (-O):

Regression (10)
TEST OLD NEW DELTA SPEEDUP
ObserverForwarderStruct 971 1191 +22.7% 0.82x
ProtocolDispatch 2153 2626 +22.0% 0.82x
StringBuilderLong 804 941 +17.0% 0.85x
MonteCarloE 8874 9866 +11.2% 0.90x
ObjectiveCBridgeStubDateAccess 188 209 +11.2% 0.90x
Memset 178 195 +9.6% 0.91x
Array2D 1684 1839 +9.2% 0.92x
Calculator 29 31 +6.9% 0.94x
MapReduceString 90 96 +6.7% 0.94x
DropWhileAnyCollectionLazy 92 98 +6.5% 0.94x
Improvement (57)
TEST OLD NEW DELTA SPEEDUP
Chars 1835 732 -60.1% 2.51x
SuffixArrayLazy 10 6 -40.0% 1.67x
SuffixArray 10 6 -40.0% 1.67x
SuperChars 163185 130367 -20.1% 1.25x
DropWhileCountableRange 25 20 -20.0% 1.25x
StringWalk 1108 889 -19.8% 1.25x
StrComplexWalk 737 608 -17.5% 1.21x
LazilyFilteredArrays 56308 46857 -16.8% 1.20x
PrefixSequenceLazy 1637 1386 -15.3% 1.18x
ObjectiveCBridgeFromNSStringForced 2075 1817 -12.4% 1.14x
OpenClose 50 44 -12.0% 1.14x
SuffixSequenceLazy 4411 3883 -12.0% 1.14x
ObjectiveCBridgeStubFromArrayOfNSString 25506 22570 -11.5% 1.13x
SuffixCountableRangeLazy 9 8 -11.1% 1.12x
SuffixCountableRange 9 8 -11.1% 1.12x
DropLastCountableRangeLazy 9 8 -11.1% 1.12x
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 57533 51447 -10.6% 1.12x
PrefixWhileSequenceLazy 29 26 -10.3% 1.12x
StringWithCString 55048 49505 -10.1% 1.11x
PolymorphicCalls 20 18 -10.0% 1.11x
PrefixSequence 1569 1417 -9.7% 1.11x
NSDictionaryCastToSwift 4937 4489 -9.1% 1.10x
ObjectAllocation 171 157 -8.2% 1.09x
CharacterLiteralsSmall 315 290 -7.9% 1.09x
ObjectiveCBridgeToNSArray 25782 23777 -7.8% 1.08x
BitCount 13 12 -7.7% 1.08x
DropLastSequenceLazy 446 412 -7.6% 1.08x
Walsh 299 277 -7.4% 1.08x
SubstringEqualString 3103 2878 -7.3% 1.08x
SetExclusiveOr 2689 2495 -7.2% 1.08x
PrefixWhileAnySeqCRangeIterLazy 70 65 -7.1% 1.08x
PrefixWhileCountableRangeLazy 28 26 -7.1% 1.08x
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 4707 4383 -6.9% 1.07x
ArrayOfPOD 146 136 -6.8% 1.07x
SuffixAnySeqCntRange 15 14 -6.7% 1.07x
DropLastSequence 441 412 -6.6% 1.07x
ObjectiveCBridgeFromNSArrayAnyObjectForced 3937 3686 -6.4% 1.07x
PrefixWhileAnySeqCRangeIter 11715 10977 -6.3% 1.07x
ReversedArray 48 45 -6.2% 1.07x
StringHasPrefix 16 15 -6.2% 1.07x
NopDeinit 24934 23442 -6.0% 1.06x
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 32537 30596 -6.0% 1.06x
MapReduce 253 238 -5.9% 1.06x
StaticArray 17 16 -5.9% 1.06x
SortStringsUnicode 19333 18238 -5.7% 1.06x
SubstringEquatable 6608 6235 -5.6% 1.06x
PrefixWhileArray 55 52 -5.5% 1.06x
SortSortedStrings 779 739 -5.1% 1.05x
ObjectiveCBridgeStubDataAppend 3588 3404 -5.1% 1.05x
DropWhileSequenceLazy 59 56 -5.1% 1.05x
SevenBoom 1325 1258 -5.1% 1.05x
SuffixAnyCollection 20 19 -5.0% 1.05x
DropFirstArray 20 19 -5.0% 1.05x
DropLastAnyCollection 20 19 -5.0% 1.05x
DropFirstArrayLazy 20 19 -5.0% 1.05x
StringFromLongWholeSubstringGeneric 20 19 -5.0% 1.05x
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 81209 77173 -5.0% 1.05x
No Changes (214)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 2593 2706 +4.4% 0.96x
AnyHashableWithAClass 58659 59777 +1.9% 0.98x
ArrayAppend 495 489 -1.2% 1.01x
ArrayAppendArrayOfInt 357 366 +2.5% 0.98x
ArrayAppendAscii 17795 17789 -0.0% 1.00x
ArrayAppendFromGeneric 348 352 +1.1% 0.99x
ArrayAppendGenericStructs 723 701 -3.0% 1.03x
ArrayAppendLatin1 32570 32020 -1.7% 1.02x
ArrayAppendLazyMap 716 715 -0.1% 1.00x
ArrayAppendOptionals 702 695 -1.0% 1.01x
ArrayAppendRepeatCol 622 621 -0.2% 1.00x
ArrayAppendReserved 334 334 +0.0% 1.00x
ArrayAppendSequence 675 682 +1.0% 0.99x
ArrayAppendStrings 13674 13583 -0.7% 1.01x
ArrayAppendToFromGeneric 351 355 +1.1% 0.99x
ArrayAppendToGeneric 348 356 +2.3% 0.98x
ArrayAppendUTF16 30538 30588 +0.2% 1.00x
ArrayInClass 54 55 +1.9% 0.98x
ArrayLiteral 1069 1075 +0.6% 0.99x
ArrayOfGenericPOD 191 188 -1.6% 1.02x
ArrayOfGenericRef 3539 3603 +1.8% 0.98x
ArrayOfRef 3731 3592 -3.7% 1.04x
ArrayPlusEqualArrayOfInt 352 355 +0.9% 0.99x
ArrayPlusEqualFiveElementCollection 3731 3617 -3.1% 1.03x
ArrayPlusEqualSingleElementCollection 482 493 +2.3% 0.98x
ArrayPlusEqualThreeElements 1395 1386 -0.6% 1.01x
ArraySubscript 1309 1334 +1.9% 0.98x
ArrayValueProp 5 5 +0.0% 1.00x
ArrayValueProp2 5 5 +0.0% 1.00x
ArrayValueProp3 5 5 +0.0% 1.00x
ArrayValueProp4 5 5 +0.0% 1.00x
ByteSwap 0 0 +0.0% 1.00x
CStringLongAscii 4003 4101 +2.4% 0.98x
CStringLongNonAscii 1689 1750 +3.6% 0.97x
CStringShortAscii 4867 4760 -2.2% 1.02x
CaptureProp 4020 4115 +2.4% 0.98x
CharacterLiteralsLarge 4950 5098 +3.0% 0.97x
ClassArrayGetter 11 11 +0.0% 1.00x
DeadArray 132 130 -1.5% 1.02x
Dictionary 469 451 -3.8% 1.04x
Dictionary2 1549 1534 -1.0% 1.01x
Dictionary2OfObjects 2833 2803 -1.1% 1.01x
Dictionary3 411 405 -1.5% 1.01x
Dictionary3OfObjects 787 774 -1.7% 1.02x
DictionaryBridge 2702 2587 -4.3% 1.04x
DictionaryLiteral 1265 1253 -0.9% 1.01x
DictionaryOfObjects 2052 1977 -3.7% 1.04x
DictionaryRemove 2013 1934 -3.9% 1.04x
DictionaryRemoveOfObjects 20156 20100 -0.3% 1.00x
DictionarySwap 329 328 -0.3% 1.00x
DictionarySwapOfObjects 6037 5992 -0.7% 1.01x
DropFirstAnyCollection 51 50 -2.0% 1.02x
DropFirstAnyCollectionLazy 41276 40387 -2.2% 1.02x
DropFirstAnySeqCRangeIter 23838 23809 -0.1% 1.00x
DropFirstAnySeqCRangeIterLazy 23776 23981 +0.9% 0.99x
DropFirstAnySeqCntRange 45 43 -4.4% 1.05x
DropFirstAnySeqCntRangeLazy 44 43 -2.3% 1.02x
DropFirstAnySequence 5120 5068 -1.0% 1.01x
DropFirstAnySequenceLazy 5093 5054 -0.8% 1.01x
DropFirstCountableRange 27 26 -3.7% 1.04x
DropFirstCountableRangeLazy 26 26 +0.0% 1.00x
DropFirstSequence 1914 1887 -1.4% 1.01x
DropFirstSequenceLazy 1907 1831 -4.0% 1.04x
DropLastAnyCollectionLazy 14007 13541 -3.3% 1.03x
DropLastAnySeqCRangeIter 4143 4079 -1.5% 1.02x
DropLastAnySeqCRangeIterLazy 4153 4117 -0.9% 1.01x
DropLastAnySeqCntRange 14 14 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 14 14 +0.0% 1.00x
DropLastAnySequence 5976 5845 -2.2% 1.02x
DropLastAnySequenceLazy 5924 5816 -1.8% 1.02x
DropLastArray 6 6 +0.0% 1.00x
DropLastArrayLazy 6 6 +0.0% 1.00x
DropLastCountableRange 8 8 +0.0% 1.00x
DropWhileAnyCollection 63 60 -4.8% 1.05x
DropWhileAnySeqCRangeIter 19284 18567 -3.7% 1.04x
DropWhileAnySeqCRangeIterLazy 91 90 -1.1% 1.01x
DropWhileAnySeqCntRange 57 55 -3.5% 1.04x
DropWhileAnySeqCntRangeLazy 92 90 -2.2% 1.02x
DropWhileAnySequence 5832 5722 -1.9% 1.02x
DropWhileAnySequenceLazy 1872 1838 -1.8% 1.02x
DropWhileArray 31 32 +3.2% 0.97x
DropWhileArrayLazy 68 70 +2.9% 0.97x
DropWhileCountableRangeLazy 60 59 -1.7% 1.02x
DropWhileSequence 1426 1400 -1.8% 1.02x
EqualStringSubstring 421 427 +1.4% 0.99x
EqualSubstringString 411 405 -1.5% 1.01x
EqualSubstringSubstring 416 404 -2.9% 1.03x
EqualSubstringSubstringGenericEquatable 414 404 -2.4% 1.02x
ErrorHandling 2460 2393 -2.7% 1.03x
GlobalClass 0 0 +0.0% 1.00x
Hanoi 3017 3049 +1.1% 0.99x
HashTest 1394 1438 +3.2% 0.97x
Histogram 233 227 -2.6% 1.03x
Integrate 208 202 -2.9% 1.03x
IterateData 638 616 -3.4% 1.04x
Join 340 325 -4.4% 1.05x
LazilyFilteredRange 2867 2799 -2.4% 1.02x
LessSubstringSubstring 408 408 +0.0% 1.00x
LessSubstringSubstringGenericComparable 420 400 -4.8% 1.05x
LinkedList 6329 6238 -1.4% 1.01x
MapReduceAnyCollection 254 242 -4.7% 1.05x
MapReduceAnyCollectionShort 1777 1731 -2.6% 1.03x
MapReduceClass 2709 2646 -2.3% 1.02x
MapReduceClassShort 4041 3902 -3.4% 1.04x
MapReduceLazyCollection 14 14 +0.0% 1.00x
MapReduceLazyCollectionShort 37 38 +2.7% 0.97x
MapReduceLazySequence 79 81 +2.5% 0.98x
MapReduceSequence 401 406 +1.2% 0.99x
MapReduceShort 1729 1692 -2.1% 1.02x
MapReduceShortString 19 19 +0.0% 1.00x
MonteCarloPi 38569 37610 -2.5% 1.03x
NSError 267 256 -4.1% 1.04x
NSStringConversion 602 595 -1.2% 1.01x
ObjectiveCBridgeFromNSArrayAnyObject 20220 20098 -0.6% 1.01x
ObjectiveCBridgeFromNSArrayAnyObjectToString 37211 36435 -2.1% 1.02x
ObjectiveCBridgeFromNSDictionaryAnyObject 102451 101435 -1.0% 1.01x
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 88508 85787 -3.1% 1.03x
ObjectiveCBridgeFromNSSetAnyObject 54865 56480 +2.9% 0.97x
ObjectiveCBridgeFromNSSetAnyObjectForced 3398 3476 +2.3% 0.98x
ObjectiveCBridgeFromNSSetAnyObjectToString 62533 59773 -4.4% 1.05x
ObjectiveCBridgeFromNSString 1305 1272 -2.5% 1.03x
ObjectiveCBridgeStubDateMutation 243 235 -3.3% 1.03x
ObjectiveCBridgeStubFromNSDate 2945 2829 -3.9% 1.04x
ObjectiveCBridgeStubFromNSDateRef 3078 2988 -2.9% 1.03x
ObjectiveCBridgeStubFromNSString 743 711 -4.3% 1.05x
ObjectiveCBridgeStubFromNSStringRef 137 131 -4.4% 1.05x
ObjectiveCBridgeStubNSDataAppend 2143 2099 -2.1% 1.02x
ObjectiveCBridgeStubNSDateMutationRef 10667 10951 +2.7% 0.97x
ObjectiveCBridgeStubNSDateRefAccess 278 268 -3.6% 1.04x
ObjectiveCBridgeStubToArrayOfNSString 25020 24772 -1.0% 1.01x
ObjectiveCBridgeStubToNSDate 13323 13239 -0.6% 1.01x
ObjectiveCBridgeStubToNSDateRef 2894 2806 -3.0% 1.03x
ObjectiveCBridgeStubToNSString 1304 1272 -2.5% 1.03x
ObjectiveCBridgeStubToNSStringRef 89 87 -2.2% 1.02x
ObjectiveCBridgeStubURLAppendPath 195649 187135 -4.4% 1.05x
ObjectiveCBridgeStubURLAppendPathRef 198534 189804 -4.4% 1.05x
ObjectiveCBridgeToNSDictionary 42235 40835 -3.3% 1.03x
ObjectiveCBridgeToNSSet 36282 35328 -2.6% 1.03x
ObjectiveCBridgeToNSString 1089 1059 -2.8% 1.03x
ObserverClosure 1982 1961 -1.1% 1.01x
ObserverPartiallyAppliedMethod 3391 3287 -3.1% 1.03x
ObserverUnappliedMethod 2296 2204 -4.0% 1.04x
Phonebook 5280 5301 +0.4% 1.00x
PopFrontArray 898 893 -0.6% 1.01x
PopFrontArrayGeneric 878 868 -1.1% 1.01x
PopFrontUnsafePointer 7689 7521 -2.2% 1.02x
PrefixAnyCollection 51 49 -3.9% 1.04x
PrefixAnyCollectionLazy 40841 39979 -2.1% 1.02x
PrefixAnySeqCRangeIter 18582 18276 -1.6% 1.02x
PrefixAnySeqCRangeIterLazy 18803 18278 -2.8% 1.03x
PrefixAnySeqCntRange 45 43 -4.4% 1.05x
PrefixAnySeqCntRangeLazy 45 44 -2.2% 1.02x
PrefixAnySequence 4541 4367 -3.8% 1.04x
PrefixAnySequenceLazy 4472 4383 -2.0% 1.02x
PrefixArray 19 19 +0.0% 1.00x
PrefixArrayLazy 19 19 +0.0% 1.00x
PrefixCountableRange 27 26 -3.7% 1.04x
PrefixCountableRangeLazy 27 26 -3.7% 1.04x
PrefixWhileAnyCollection 87 84 -3.4% 1.04x
PrefixWhileAnyCollectionLazy 68 66 -2.9% 1.03x
PrefixWhileAnySeqCntRange 79 77 -2.5% 1.03x
PrefixWhileAnySeqCntRangeLazy 68 65 -4.4% 1.05x
PrefixWhileAnySequence 12604 12361 -1.9% 1.02x
PrefixWhileAnySequenceLazy 1434 1368 -4.6% 1.05x
PrefixWhileArrayLazy 43 42 -2.3% 1.02x
PrefixWhileCountableRange 23 22 -4.3% 1.05x
PrefixWhileSequence 234 232 -0.9% 1.01x
Prims 675 646 -4.3% 1.04x
ProtocolDispatch2 150 149 -0.7% 1.01x
RC4 102 98 -3.9% 1.04x
RGBHistogram 1950 1883 -3.4% 1.04x
RGBHistogramOfObjects 21849 21124 -3.3% 1.03x
RangeAssignment 254 254 +0.0% 1.00x
RecursiveOwnedParameter 1785 1739 -2.6% 1.03x
ReversedBidirectional 26365 25390 -3.7% 1.04x
ReversedDictionary 130 134 +3.1% 0.97x
SetExclusiveOr_OfObjects 8260 8140 -1.5% 1.01x
SetIntersect 222 212 -4.5% 1.05x
SetIntersect_OfObjects 1521 1479 -2.8% 1.03x
SetIsSubsetOf 273 265 -2.9% 1.03x
SetIsSubsetOf_OfObjects 348 338 -2.9% 1.03x
SetUnion 2314 2274 -1.7% 1.02x
SetUnion_OfObjects 6800 6666 -2.0% 1.02x
Sim2DArray 236 228 -3.4% 1.04x
SortLargeExistentials 6737 6639 -1.5% 1.01x
SortLettersInPlace 1005 993 -1.2% 1.01x
SortStrings 1451 1434 -1.2% 1.01x
StackPromo 20166 19641 -2.6% 1.03x
StrToInt 1761 1699 -3.5% 1.04x
StringAdder 0 0 +0.0% 1.00x
StringBuilder 826 859 +4.0% 0.96x
StringEdits 88811 87510 -1.5% 1.01x
StringEqualPointerComparison 245 236 -3.7% 1.04x
StringFromLongWholeSubstring 8459 8276 -2.2% 1.02x
StringHasPrefixUnicode 34216 32820 -4.1% 1.04x
StringHasSuffix 16 16 +0.0% 1.00x
StringHasSuffixUnicode 72395 70730 -2.3% 1.02x
StringInterpolation 8994 9128 +1.5% 0.99x
StringMatch 6010 5883 -2.1% 1.02x
StringUTF16Builder 1555 1587 +2.1% 0.98x
SubstringComparable 3185 3160 -0.8% 1.01x
SubstringFromLongString 85 82 -3.5% 1.04x
SubstringFromLongStringGeneric 148 154 +4.1% 0.96x
SuffixAnyCollectionLazy 13742 13351 -2.8% 1.03x
SuffixAnySeqCRangeIter 4518 4358 -3.5% 1.04x
SuffixAnySeqCRangeIterLazy 4499 4334 -3.7% 1.04x
SuffixAnySeqCntRangeLazy 14 14 +0.0% 1.00x
SuffixAnySequence 6053 6010 -0.7% 1.01x
SuffixAnySequenceLazy 6130 6070 -1.0% 1.01x
SuffixSequence 4004 3875 -3.2% 1.03x
TwoSum 828 815 -1.6% 1.02x
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 214 204 -4.7% 1.05x
XorLoop 256 264 +3.1% 0.97x
Member

dabrahams commented Jun 14, 2017

Locally-derived benchmark results (-O):

Regression (10)
TEST OLD NEW DELTA SPEEDUP
ObserverForwarderStruct 971 1191 +22.7% 0.82x
ProtocolDispatch 2153 2626 +22.0% 0.82x
StringBuilderLong 804 941 +17.0% 0.85x
MonteCarloE 8874 9866 +11.2% 0.90x
ObjectiveCBridgeStubDateAccess 188 209 +11.2% 0.90x
Memset 178 195 +9.6% 0.91x
Array2D 1684 1839 +9.2% 0.92x
Calculator 29 31 +6.9% 0.94x
MapReduceString 90 96 +6.7% 0.94x
DropWhileAnyCollectionLazy 92 98 +6.5% 0.94x
Improvement (57)
TEST OLD NEW DELTA SPEEDUP
Chars 1835 732 -60.1% 2.51x
SuffixArrayLazy 10 6 -40.0% 1.67x
SuffixArray 10 6 -40.0% 1.67x
SuperChars 163185 130367 -20.1% 1.25x
DropWhileCountableRange 25 20 -20.0% 1.25x
StringWalk 1108 889 -19.8% 1.25x
StrComplexWalk 737 608 -17.5% 1.21x
LazilyFilteredArrays 56308 46857 -16.8% 1.20x
PrefixSequenceLazy 1637 1386 -15.3% 1.18x
ObjectiveCBridgeFromNSStringForced 2075 1817 -12.4% 1.14x
OpenClose 50 44 -12.0% 1.14x
SuffixSequenceLazy 4411 3883 -12.0% 1.14x
ObjectiveCBridgeStubFromArrayOfNSString 25506 22570 -11.5% 1.13x
SuffixCountableRangeLazy 9 8 -11.1% 1.12x
SuffixCountableRange 9 8 -11.1% 1.12x
DropLastCountableRangeLazy 9 8 -11.1% 1.12x
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 57533 51447 -10.6% 1.12x
PrefixWhileSequenceLazy 29 26 -10.3% 1.12x
StringWithCString 55048 49505 -10.1% 1.11x
PolymorphicCalls 20 18 -10.0% 1.11x
PrefixSequence 1569 1417 -9.7% 1.11x
NSDictionaryCastToSwift 4937 4489 -9.1% 1.10x
ObjectAllocation 171 157 -8.2% 1.09x
CharacterLiteralsSmall 315 290 -7.9% 1.09x
ObjectiveCBridgeToNSArray 25782 23777 -7.8% 1.08x
BitCount 13 12 -7.7% 1.08x
DropLastSequenceLazy 446 412 -7.6% 1.08x
Walsh 299 277 -7.4% 1.08x
SubstringEqualString 3103 2878 -7.3% 1.08x
SetExclusiveOr 2689 2495 -7.2% 1.08x
PrefixWhileAnySeqCRangeIterLazy 70 65 -7.1% 1.08x
PrefixWhileCountableRangeLazy 28 26 -7.1% 1.08x
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 4707 4383 -6.9% 1.07x
ArrayOfPOD 146 136 -6.8% 1.07x
SuffixAnySeqCntRange 15 14 -6.7% 1.07x
DropLastSequence 441 412 -6.6% 1.07x
ObjectiveCBridgeFromNSArrayAnyObjectForced 3937 3686 -6.4% 1.07x
PrefixWhileAnySeqCRangeIter 11715 10977 -6.3% 1.07x
ReversedArray 48 45 -6.2% 1.07x
StringHasPrefix 16 15 -6.2% 1.07x
NopDeinit 24934 23442 -6.0% 1.06x
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 32537 30596 -6.0% 1.06x
MapReduce 253 238 -5.9% 1.06x
StaticArray 17 16 -5.9% 1.06x
SortStringsUnicode 19333 18238 -5.7% 1.06x
SubstringEquatable 6608 6235 -5.6% 1.06x
PrefixWhileArray 55 52 -5.5% 1.06x
SortSortedStrings 779 739 -5.1% 1.05x
ObjectiveCBridgeStubDataAppend 3588 3404 -5.1% 1.05x
DropWhileSequenceLazy 59 56 -5.1% 1.05x
SevenBoom 1325 1258 -5.1% 1.05x
SuffixAnyCollection 20 19 -5.0% 1.05x
DropFirstArray 20 19 -5.0% 1.05x
DropLastAnyCollection 20 19 -5.0% 1.05x
DropFirstArrayLazy 20 19 -5.0% 1.05x
StringFromLongWholeSubstringGeneric 20 19 -5.0% 1.05x
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 81209 77173 -5.0% 1.05x
No Changes (214)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 2593 2706 +4.4% 0.96x
AnyHashableWithAClass 58659 59777 +1.9% 0.98x
ArrayAppend 495 489 -1.2% 1.01x
ArrayAppendArrayOfInt 357 366 +2.5% 0.98x
ArrayAppendAscii 17795 17789 -0.0% 1.00x
ArrayAppendFromGeneric 348 352 +1.1% 0.99x
ArrayAppendGenericStructs 723 701 -3.0% 1.03x
ArrayAppendLatin1 32570 32020 -1.7% 1.02x
ArrayAppendLazyMap 716 715 -0.1% 1.00x
ArrayAppendOptionals 702 695 -1.0% 1.01x
ArrayAppendRepeatCol 622 621 -0.2% 1.00x
ArrayAppendReserved 334 334 +0.0% 1.00x
ArrayAppendSequence 675 682 +1.0% 0.99x
ArrayAppendStrings 13674 13583 -0.7% 1.01x
ArrayAppendToFromGeneric 351 355 +1.1% 0.99x
ArrayAppendToGeneric 348 356 +2.3% 0.98x
ArrayAppendUTF16 30538 30588 +0.2% 1.00x
ArrayInClass 54 55 +1.9% 0.98x
ArrayLiteral 1069 1075 +0.6% 0.99x
ArrayOfGenericPOD 191 188 -1.6% 1.02x
ArrayOfGenericRef 3539 3603 +1.8% 0.98x
ArrayOfRef 3731 3592 -3.7% 1.04x
ArrayPlusEqualArrayOfInt 352 355 +0.9% 0.99x
ArrayPlusEqualFiveElementCollection 3731 3617 -3.1% 1.03x
ArrayPlusEqualSingleElementCollection 482 493 +2.3% 0.98x
ArrayPlusEqualThreeElements 1395 1386 -0.6% 1.01x
ArraySubscript 1309 1334 +1.9% 0.98x
ArrayValueProp 5 5 +0.0% 1.00x
ArrayValueProp2 5 5 +0.0% 1.00x
ArrayValueProp3 5 5 +0.0% 1.00x
ArrayValueProp4 5 5 +0.0% 1.00x
ByteSwap 0 0 +0.0% 1.00x
CStringLongAscii 4003 4101 +2.4% 0.98x
CStringLongNonAscii 1689 1750 +3.6% 0.97x
CStringShortAscii 4867 4760 -2.2% 1.02x
CaptureProp 4020 4115 +2.4% 0.98x
CharacterLiteralsLarge 4950 5098 +3.0% 0.97x
ClassArrayGetter 11 11 +0.0% 1.00x
DeadArray 132 130 -1.5% 1.02x
Dictionary 469 451 -3.8% 1.04x
Dictionary2 1549 1534 -1.0% 1.01x
Dictionary2OfObjects 2833 2803 -1.1% 1.01x
Dictionary3 411 405 -1.5% 1.01x
Dictionary3OfObjects 787 774 -1.7% 1.02x
DictionaryBridge 2702 2587 -4.3% 1.04x
DictionaryLiteral 1265 1253 -0.9% 1.01x
DictionaryOfObjects 2052 1977 -3.7% 1.04x
DictionaryRemove 2013 1934 -3.9% 1.04x
DictionaryRemoveOfObjects 20156 20100 -0.3% 1.00x
DictionarySwap 329 328 -0.3% 1.00x
DictionarySwapOfObjects 6037 5992 -0.7% 1.01x
DropFirstAnyCollection 51 50 -2.0% 1.02x
DropFirstAnyCollectionLazy 41276 40387 -2.2% 1.02x
DropFirstAnySeqCRangeIter 23838 23809 -0.1% 1.00x
DropFirstAnySeqCRangeIterLazy 23776 23981 +0.9% 0.99x
DropFirstAnySeqCntRange 45 43 -4.4% 1.05x
DropFirstAnySeqCntRangeLazy 44 43 -2.3% 1.02x
DropFirstAnySequence 5120 5068 -1.0% 1.01x
DropFirstAnySequenceLazy 5093 5054 -0.8% 1.01x
DropFirstCountableRange 27 26 -3.7% 1.04x
DropFirstCountableRangeLazy 26 26 +0.0% 1.00x
DropFirstSequence 1914 1887 -1.4% 1.01x
DropFirstSequenceLazy 1907 1831 -4.0% 1.04x
DropLastAnyCollectionLazy 14007 13541 -3.3% 1.03x
DropLastAnySeqCRangeIter 4143 4079 -1.5% 1.02x
DropLastAnySeqCRangeIterLazy 4153 4117 -0.9% 1.01x
DropLastAnySeqCntRange 14 14 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 14 14 +0.0% 1.00x
DropLastAnySequence 5976 5845 -2.2% 1.02x
DropLastAnySequenceLazy 5924 5816 -1.8% 1.02x
DropLastArray 6 6 +0.0% 1.00x
DropLastArrayLazy 6 6 +0.0% 1.00x
DropLastCountableRange 8 8 +0.0% 1.00x
DropWhileAnyCollection 63 60 -4.8% 1.05x
DropWhileAnySeqCRangeIter 19284 18567 -3.7% 1.04x
DropWhileAnySeqCRangeIterLazy 91 90 -1.1% 1.01x
DropWhileAnySeqCntRange 57 55 -3.5% 1.04x
DropWhileAnySeqCntRangeLazy 92 90 -2.2% 1.02x
DropWhileAnySequence 5832 5722 -1.9% 1.02x
DropWhileAnySequenceLazy 1872 1838 -1.8% 1.02x
DropWhileArray 31 32 +3.2% 0.97x
DropWhileArrayLazy 68 70 +2.9% 0.97x
DropWhileCountableRangeLazy 60 59 -1.7% 1.02x
DropWhileSequence 1426 1400 -1.8% 1.02x
EqualStringSubstring 421 427 +1.4% 0.99x
EqualSubstringString 411 405 -1.5% 1.01x
EqualSubstringSubstring 416 404 -2.9% 1.03x
EqualSubstringSubstringGenericEquatable 414 404 -2.4% 1.02x
ErrorHandling 2460 2393 -2.7% 1.03x
GlobalClass 0 0 +0.0% 1.00x
Hanoi 3017 3049 +1.1% 0.99x
HashTest 1394 1438 +3.2% 0.97x
Histogram 233 227 -2.6% 1.03x
Integrate 208 202 -2.9% 1.03x
IterateData 638 616 -3.4% 1.04x
Join 340 325 -4.4% 1.05x
LazilyFilteredRange 2867 2799 -2.4% 1.02x
LessSubstringSubstring 408 408 +0.0% 1.00x
LessSubstringSubstringGenericComparable 420 400 -4.8% 1.05x
LinkedList 6329 6238 -1.4% 1.01x
MapReduceAnyCollection 254 242 -4.7% 1.05x
MapReduceAnyCollectionShort 1777 1731 -2.6% 1.03x
MapReduceClass 2709 2646 -2.3% 1.02x
MapReduceClassShort 4041 3902 -3.4% 1.04x
MapReduceLazyCollection 14 14 +0.0% 1.00x
MapReduceLazyCollectionShort 37 38 +2.7% 0.97x
MapReduceLazySequence 79 81 +2.5% 0.98x
MapReduceSequence 401 406 +1.2% 0.99x
MapReduceShort 1729 1692 -2.1% 1.02x
MapReduceShortString 19 19 +0.0% 1.00x
MonteCarloPi 38569 37610 -2.5% 1.03x
NSError 267 256 -4.1% 1.04x
NSStringConversion 602 595 -1.2% 1.01x
ObjectiveCBridgeFromNSArrayAnyObject 20220 20098 -0.6% 1.01x
ObjectiveCBridgeFromNSArrayAnyObjectToString 37211 36435 -2.1% 1.02x
ObjectiveCBridgeFromNSDictionaryAnyObject 102451 101435 -1.0% 1.01x
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 88508 85787 -3.1% 1.03x
ObjectiveCBridgeFromNSSetAnyObject 54865 56480 +2.9% 0.97x
ObjectiveCBridgeFromNSSetAnyObjectForced 3398 3476 +2.3% 0.98x
ObjectiveCBridgeFromNSSetAnyObjectToString 62533 59773 -4.4% 1.05x
ObjectiveCBridgeFromNSString 1305 1272 -2.5% 1.03x
ObjectiveCBridgeStubDateMutation 243 235 -3.3% 1.03x
ObjectiveCBridgeStubFromNSDate 2945 2829 -3.9% 1.04x
ObjectiveCBridgeStubFromNSDateRef 3078 2988 -2.9% 1.03x
ObjectiveCBridgeStubFromNSString 743 711 -4.3% 1.05x
ObjectiveCBridgeStubFromNSStringRef 137 131 -4.4% 1.05x
ObjectiveCBridgeStubNSDataAppend 2143 2099 -2.1% 1.02x
ObjectiveCBridgeStubNSDateMutationRef 10667 10951 +2.7% 0.97x
ObjectiveCBridgeStubNSDateRefAccess 278 268 -3.6% 1.04x
ObjectiveCBridgeStubToArrayOfNSString 25020 24772 -1.0% 1.01x
ObjectiveCBridgeStubToNSDate 13323 13239 -0.6% 1.01x
ObjectiveCBridgeStubToNSDateRef 2894 2806 -3.0% 1.03x
ObjectiveCBridgeStubToNSString 1304 1272 -2.5% 1.03x
ObjectiveCBridgeStubToNSStringRef 89 87 -2.2% 1.02x
ObjectiveCBridgeStubURLAppendPath 195649 187135 -4.4% 1.05x
ObjectiveCBridgeStubURLAppendPathRef 198534 189804 -4.4% 1.05x
ObjectiveCBridgeToNSDictionary 42235 40835 -3.3% 1.03x
ObjectiveCBridgeToNSSet 36282 35328 -2.6% 1.03x
ObjectiveCBridgeToNSString 1089 1059 -2.8% 1.03x
ObserverClosure 1982 1961 -1.1% 1.01x
ObserverPartiallyAppliedMethod 3391 3287 -3.1% 1.03x
ObserverUnappliedMethod 2296 2204 -4.0% 1.04x
Phonebook 5280 5301 +0.4% 1.00x
PopFrontArray 898 893 -0.6% 1.01x
PopFrontArrayGeneric 878 868 -1.1% 1.01x
PopFrontUnsafePointer 7689 7521 -2.2% 1.02x
PrefixAnyCollection 51 49 -3.9% 1.04x
PrefixAnyCollectionLazy 40841 39979 -2.1% 1.02x
PrefixAnySeqCRangeIter 18582 18276 -1.6% 1.02x
PrefixAnySeqCRangeIterLazy 18803 18278 -2.8% 1.03x
PrefixAnySeqCntRange 45 43 -4.4% 1.05x
PrefixAnySeqCntRangeLazy 45 44 -2.2% 1.02x
PrefixAnySequence 4541 4367 -3.8% 1.04x
PrefixAnySequenceLazy 4472 4383 -2.0% 1.02x
PrefixArray 19 19 +0.0% 1.00x
PrefixArrayLazy 19 19 +0.0% 1.00x
PrefixCountableRange 27 26 -3.7% 1.04x
PrefixCountableRangeLazy 27 26 -3.7% 1.04x
PrefixWhileAnyCollection 87 84 -3.4% 1.04x
PrefixWhileAnyCollectionLazy 68 66 -2.9% 1.03x
PrefixWhileAnySeqCntRange 79 77 -2.5% 1.03x
PrefixWhileAnySeqCntRangeLazy 68 65 -4.4% 1.05x
PrefixWhileAnySequence 12604 12361 -1.9% 1.02x
PrefixWhileAnySequenceLazy 1434 1368 -4.6% 1.05x
PrefixWhileArrayLazy 43 42 -2.3% 1.02x
PrefixWhileCountableRange 23 22 -4.3% 1.05x
PrefixWhileSequence 234 232 -0.9% 1.01x
Prims 675 646 -4.3% 1.04x
ProtocolDispatch2 150 149 -0.7% 1.01x
RC4 102 98 -3.9% 1.04x
RGBHistogram 1950 1883 -3.4% 1.04x
RGBHistogramOfObjects 21849 21124 -3.3% 1.03x
RangeAssignment 254 254 +0.0% 1.00x
RecursiveOwnedParameter 1785 1739 -2.6% 1.03x
ReversedBidirectional 26365 25390 -3.7% 1.04x
ReversedDictionary 130 134 +3.1% 0.97x
SetExclusiveOr_OfObjects 8260 8140 -1.5% 1.01x
SetIntersect 222 212 -4.5% 1.05x
SetIntersect_OfObjects 1521 1479 -2.8% 1.03x
SetIsSubsetOf 273 265 -2.9% 1.03x
SetIsSubsetOf_OfObjects 348 338 -2.9% 1.03x
SetUnion 2314 2274 -1.7% 1.02x
SetUnion_OfObjects 6800 6666 -2.0% 1.02x
Sim2DArray 236 228 -3.4% 1.04x
SortLargeExistentials 6737 6639 -1.5% 1.01x
SortLettersInPlace 1005 993 -1.2% 1.01x
SortStrings 1451 1434 -1.2% 1.01x
StackPromo 20166 19641 -2.6% 1.03x
StrToInt 1761 1699 -3.5% 1.04x
StringAdder 0 0 +0.0% 1.00x
StringBuilder 826 859 +4.0% 0.96x
StringEdits 88811 87510 -1.5% 1.01x
StringEqualPointerComparison 245 236 -3.7% 1.04x
StringFromLongWholeSubstring 8459 8276 -2.2% 1.02x
StringHasPrefixUnicode 34216 32820 -4.1% 1.04x
StringHasSuffix 16 16 +0.0% 1.00x
StringHasSuffixUnicode 72395 70730 -2.3% 1.02x
StringInterpolation 8994 9128 +1.5% 0.99x
StringMatch 6010 5883 -2.1% 1.02x
StringUTF16Builder 1555 1587 +2.1% 0.98x
SubstringComparable 3185 3160 -0.8% 1.01x
SubstringFromLongString 85 82 -3.5% 1.04x
SubstringFromLongStringGeneric 148 154 +4.1% 0.96x
SuffixAnyCollectionLazy 13742 13351 -2.8% 1.03x
SuffixAnySeqCRangeIter 4518 4358 -3.5% 1.04x
SuffixAnySeqCRangeIterLazy 4499 4334 -3.7% 1.04x
SuffixAnySeqCntRangeLazy 14 14 +0.0% 1.00x
SuffixAnySequence 6053 6010 -0.7% 1.01x
SuffixAnySequenceLazy 6130 6070 -1.0% 1.01x
SuffixSequence 4004 3875 -3.2% 1.03x
TwoSum 828 815 -1.6% 1.02x
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 214 204 -4.7% 1.05x
XorLoop 256 264 +3.1% 0.97x

@airspeedswift airspeedswift merged commit 46952ad into apple:swift-4.0-branch Jun 14, 2017

5 of 6 checks passed

Swift Benchmark on OS X Platform Build finished.
Details
Swift Source Compatibility Suite on macOS Platform Build finished.
Details
Swift Test Linux Platform 9911 tests run, 0 skipped, 0 failed.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform 49810 tests run, 0 skipped, 0 failed.
Details
Swift Test OS X Platform (smoke test)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment