Skip to content

[stdlib] Add custom implementations of removeLast and remove(at:) to Array #14273

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

Merged
merged 1 commit into from
Jan 31, 2018

Conversation

airspeedswift
Copy link
Member

@airspeedswift airspeedswift commented Jan 30, 2018

Another go at #14212, this time without sharing of code between removeLast and popLast (which also means avoiding duplicate checks)

@airspeedswift
Copy link
Member Author

@swift-ci please smoke benchmark

@airspeedswift
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (21)
TEST OLD NEW DELTA SPEEDUP
PrefixAnySeqCRangeIterLazy 14711 18241 +24.0% 0.81x
PrefixAnySeqCRangeIter 14728 18202 +23.6% 0.81x
RangeIterationSigned 171 200 +17.0% 0.86x
DropFirstAnySeqCRangeIterLazy 22694 26421 +16.4% 0.86x
DropFirstAnySeqCRangeIter 22777 26416 +16.0% 0.86x
MapReduceLazyCollectionShort 34 39 +14.7% 0.87x
DropWhileAnySeqCRangeIter 15588 17718 +13.7% 0.88x (?)
MonteCarloE 10412 11781 +13.1% 0.88x
DictionaryRemove 2725 3020 +10.8% 0.90x
DropFirstAnyCollectionLazy 65602 71690 +9.3% 0.92x
PointerArithmetics 31499 34384 +9.2% 0.92x
DropLastCountableRange 11 12 +9.1% 0.92x
SuffixCountableRangeLazy 11 12 +9.1% 0.92x
SortSortedStrings 1111 1200 +8.0% 0.93x
Hanoi 3351 3613 +7.8% 0.93x
MapReduceAnyCollection 371 400 +7.8% 0.93x
MapReduceLazyCollection 13 14 +7.7% 0.93x
PrefixAnyCollectionLazy 65327 69919 +7.0% 0.93x (?)
SortStrings 1966 2094 +6.5% 0.94x
ObjectiveCBridgeFromNSStringForced 2392 2542 +6.3% 0.94x (?)
LazilyFilteredRange 3829 4036 +5.4% 0.95x
Improvement (10)
TEST OLD NEW DELTA SPEEDUP
Sim2DArray 599 411 -31.4% 1.46x
DropLastCountableRangeLazy 12 11 -8.3% 1.09x
DropLastSequenceLazy 687 635 -7.6% 1.08x
DropLastSequence 687 635 -7.6% 1.08x
NopDeinit 23328 21583 -7.5% 1.08x
ArrayPlusEqualSingleElementCollection 1093 1015 -7.1% 1.08x
ObjectiveCBridgeFromNSArrayAnyObjectToString 42901 39938 -6.9% 1.07x (?)
ArrayAppendReserved 800 756 -5.5% 1.06x
SumUsingReduce 102 97 -4.9% 1.05x
SumUsingReduceInto 102 97 -4.9% 1.05x
No Changes (324)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 3787 3609 -4.7% 1.05x
AnyHashableWithAClass 69200 70206 +1.5% 0.99x (?)
Array2D 2555 2568 +0.5% 0.99x
ArrayAppend 1067 1019 -4.5% 1.05x
ArrayAppendArrayOfInt 797 796 -0.1% 1.00x (?)
ArrayAppendAscii 13678 13734 +0.4% 1.00x
ArrayAppendFromGeneric 800 798 -0.2% 1.00x (?)
ArrayAppendGenericStructs 1440 1428 -0.8% 1.01x
ArrayAppendLatin1 38248 38369 +0.3% 1.00x (?)
ArrayAppendLazyMap 1342 1342 +0.0% 1.00x
ArrayAppendOptionals 1431 1424 -0.5% 1.00x
ArrayAppendRepeatCol 1340 1340 +0.0% 1.00x
ArrayAppendSequence 1135 1132 -0.3% 1.00x (?)
ArrayAppendStrings 15237 15223 -0.1% 1.00x (?)
ArrayAppendToFromGeneric 799 799 +0.0% 1.00x
ArrayAppendToGeneric 798 797 -0.1% 1.00x (?)
ArrayAppendUTF16 38001 37215 -2.1% 1.02x
ArrayInClass 86 86 +0.0% 1.00x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD2 149 151 +1.3% 0.99x (?)
ArrayOfGenericRef 4400 4386 -0.3% 1.00x (?)
ArrayOfPOD 183 183 +0.0% 1.00x
ArrayOfRef 4355 4336 -0.4% 1.00x (?)
ArrayPlusEqualArrayOfInt 795 797 +0.3% 1.00x (?)
ArrayPlusEqualFiveElementCollection 5716 5513 -3.6% 1.04x
ArrayPlusEqualThreeElements 1659 1651 -0.5% 1.00x (?)
ArraySubscript 1538 1575 +2.4% 0.98x
ArrayValueProp 8 8 +0.0% 1.00x
ArrayValueProp2 8 8 +0.0% 1.00x
ArrayValueProp3 8 8 +0.0% 1.00x
ArrayValueProp4 8 8 +0.0% 1.00x
BinaryFloatingPointConversionFromBinaryInteger 45 45 +0.0% 1.00x
BitCount 202 202 +0.0% 1.00x
ByteSwap 100 101 +1.0% 0.99x
COWTree 3634 3682 +1.3% 0.99x (?)
CStringLongAscii 4777 4770 -0.1% 1.00x (?)
CStringLongNonAscii 2103 2090 -0.6% 1.01x
CStringShortAscii 4737 4731 -0.1% 1.00x (?)
Calculator 441 431 -2.3% 1.02x
CaptureProp 8897 8884 -0.1% 1.00x
CharIndexing_ascii_unicodeScalars 15887 15366 -3.3% 1.03x
CharIndexing_ascii_unicodeScalars_Backwards 14397 14993 +4.1% 0.96x
CharIndexing_chinese_unicodeScalars 12041 11634 -3.4% 1.03x
CharIndexing_chinese_unicodeScalars_Backwards 10915 11355 +4.0% 0.96x
CharIndexing_japanese_unicodeScalars 19033 18378 -3.4% 1.04x
CharIndexing_japanese_unicodeScalars_Backwards 17236 17932 +4.0% 0.96x
CharIndexing_korean_unicodeScalars 15410 14907 -3.3% 1.03x
CharIndexing_korean_unicodeScalars_Backwards 13981 14529 +3.9% 0.96x
CharIndexing_punctuatedJapanese_unicodeScalars 2889 2797 -3.2% 1.03x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2635 2726 +3.5% 0.97x
CharIndexing_punctuated_unicodeScalars 3602 3495 -3.0% 1.03x
CharIndexing_punctuated_unicodeScalars_Backwards 3284 3406 +3.7% 0.96x
CharIndexing_russian_unicodeScalars 13238 12801 -3.3% 1.03x
CharIndexing_russian_unicodeScalars_Backwards 12001 12497 +4.1% 0.96x
CharIndexing_tweet_unicodeScalars 31562 30296 -4.0% 1.04x
CharIndexing_tweet_unicodeScalars_Backwards 28498 29526 +3.6% 0.97x
CharIndexing_utf16_unicodeScalars 20831 20706 -0.6% 1.01x
CharIndexing_utf16_unicodeScalars_Backwards 21314 21519 +1.0% 0.99x
CharIteration_ascii_unicodeScalars 20611 21315 +3.4% 0.97x
CharIteration_ascii_unicodeScalars_Backwards 14078 13505 -4.1% 1.04x
CharIteration_chinese_unicodeScalars 15600 16129 +3.4% 0.97x
CharIteration_chinese_unicodeScalars_Backwards 10670 10247 -4.0% 1.04x
CharIteration_japanese_unicodeScalars 24726 25605 +3.6% 0.97x
CharIteration_japanese_unicodeScalars_Backwards 16833 16167 -4.0% 1.04x
CharIteration_korean_unicodeScalars 20007 20666 +3.3% 0.97x
CharIteration_korean_unicodeScalars_Backwards 13661 13093 -4.2% 1.04x
CharIteration_punctuatedJapanese_unicodeScalars 3655 3798 +3.9% 0.96x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2584 2488 -3.7% 1.04x
CharIteration_punctuated_unicodeScalars 4596 4779 +4.0% 0.96x
CharIteration_punctuated_unicodeScalars_Backwards 3222 3104 -3.7% 1.04x
CharIteration_russian_unicodeScalars 17208 17745 +3.1% 0.97x
CharIteration_russian_unicodeScalars_Backwards 11724 11262 -3.9% 1.04x
CharIteration_tweet_unicodeScalars 40985 42521 +3.7% 0.96x
CharIteration_tweet_unicodeScalars_Backwards 27475 26639 -3.0% 1.03x
CharIteration_utf16_unicodeScalars 27495 27548 +0.2% 1.00x
CharIteration_utf16_unicodeScalars_Backwards 16945 17058 +0.7% 0.99x
CharacterLiteralsLarge 6042 5993 -0.8% 1.01x (?)
CharacterLiteralsSmall 411 411 +0.0% 1.00x
CharacterPropertiesFetch 4576 4614 +0.8% 0.99x (?)
CharacterPropertiesPrecomputed 975 974 -0.1% 1.00x (?)
CharacterPropertiesStashed 1557 1522 -2.2% 1.02x
CharacterPropertiesStashedMemo 1537 1517 -1.3% 1.01x (?)
Chars 970 969 -0.1% 1.00x (?)
ClassArrayGetter 15 15 +0.0% 1.00x
Combos 456 453 -0.7% 1.01x
DictOfArraysToArrayOfDicts 803 805 +0.2% 1.00x (?)
Dictionary 504 510 +1.2% 0.99x
Dictionary2 1615 1603 -0.7% 1.01x
Dictionary2OfObjects 2980 2953 -0.9% 1.01x
Dictionary3 237 234 -1.3% 1.01x (?)
Dictionary3OfObjects 674 675 +0.1% 1.00x (?)
DictionaryBridge 2086 2144 +2.8% 0.97x (?)
DictionaryGroup 133 133 +0.0% 1.00x
DictionaryGroupOfObjects 1936 1919 -0.9% 1.01x (?)
DictionaryLiteral 1619 1593 -1.6% 1.02x
DictionaryOfObjects 2192 2202 +0.5% 1.00x (?)
DictionaryRemoveOfObjects 23630 23641 +0.0% 1.00x (?)
DictionarySubscriptDefaultMutation 144 146 +1.4% 0.99x
DictionarySubscriptDefaultMutationArray 490 493 +0.6% 0.99x
DictionarySubscriptDefaultMutationArrayOfObjects 3823 3825 +0.1% 1.00x (?)
DictionarySubscriptDefaultMutationOfObjects 1383 1384 +0.1% 1.00x (?)
DictionarySwap 468 467 -0.2% 1.00x
DictionarySwapOfObjects 7672 7736 +0.8% 0.99x (?)
DoubleWidthDivision 1409 1430 +1.5% 0.99x
DropFirstAnyCollection 76 76 +0.0% 1.00x
DropFirstAnySeqCntRange 71 71 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 71 71 +0.0% 1.00x
DropFirstAnySequence 4414 4441 +0.6% 0.99x
DropFirstAnySequenceLazy 4412 4427 +0.3% 1.00x
DropFirstArray 35 35 +0.0% 1.00x
DropFirstArrayLazy 35 35 +0.0% 1.00x
DropFirstCountableRange 35 35 +0.0% 1.00x
DropFirstCountableRangeLazy 35 35 +0.0% 1.00x
DropFirstSequence 2699 2698 -0.0% 1.00x (?)
DropFirstSequenceLazy 2793 2786 -0.3% 1.00x
DropLastAnyCollection 28 28 +0.0% 1.00x
DropLastAnyCollectionLazy 21787 22704 +4.2% 0.96x (?)
DropLastAnySeqCRangeIter 3573 3537 -1.0% 1.01x
DropLastAnySeqCRangeIterLazy 3561 3546 -0.4% 1.00x (?)
DropLastAnySeqCntRange 23 23 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 23 23 +0.0% 1.00x
DropLastAnySequence 5137 5110 -0.5% 1.01x (?)
DropLastAnySequenceLazy 5227 5228 +0.0% 1.00x (?)
DropWhileAnyCollection 100 100 +0.0% 1.00x
DropWhileAnyCollectionLazy 147 148 +0.7% 0.99x
DropWhileAnySeqCRangeIterLazy 147 147 +0.0% 1.00x
DropWhileAnySeqCntRange 95 95 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 147 147 +0.0% 1.00x
DropWhileAnySequence 4740 4716 -0.5% 1.01x
DropWhileAnySequenceLazy 1858 1855 -0.2% 1.00x
DropWhileArrayLazy 129 129 +0.0% 1.00x
DropWhileCountableRange 36 36 +0.0% 1.00x
DropWhileCountableRangeLazy 111 111 +0.0% 1.00x
DropWhileSequence 1342 1341 -0.1% 1.00x (?)
DropWhileSequenceLazy 88 88 +0.0% 1.00x
EqualStringSubstring 431 433 +0.5% 1.00x (?)
EqualSubstringString 431 432 +0.2% 1.00x (?)
EqualSubstringSubstring 431 433 +0.5% 1.00x (?)
EqualSubstringSubstringGenericEquatable 431 432 +0.2% 1.00x
ErrorHandling 2358 2379 +0.9% 0.99x (?)
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FilterEvenUsingReduce 1314 1337 +1.8% 0.98x
FilterEvenUsingReduceInto 148 152 +2.7% 0.97x
FrequenciesUsingReduce 6799 6664 -2.0% 1.02x (?)
FrequenciesUsingReduceInto 3174 3174 +0.0% 1.00x
HashTest 1780 1769 -0.6% 1.01x
Histogram 323 321 -0.6% 1.01x
Integrate 217 217 +0.0% 1.00x
IterateData 1387 1426 +2.8% 0.97x
Join 374 371 -0.8% 1.01x
LazilyFilteredArrayContains 36684 36262 -1.2% 1.01x
LazilyFilteredArrays 66907 65567 -2.0% 1.02x (?)
LessSubstringSubstring 431 431 +0.0% 1.00x
LessSubstringSubstringGenericComparable 431 433 +0.5% 1.00x (?)
LinkedList 7592 7594 +0.0% 1.00x
LuhnAlgoEager 589 592 +0.5% 0.99x (?)
LuhnAlgoLazy 594 592 -0.3% 1.00x
MapReduce 398 399 +0.3% 1.00x (?)
MapReduceAnyCollectionShort 2048 2034 -0.7% 1.01x (?)
MapReduceClass 3073 3057 -0.5% 1.01x
MapReduceClassShort 4603 4600 -0.1% 1.00x (?)
MapReduceLazySequence 86 86 +0.0% 1.00x
MapReduceSequence 467 462 -1.1% 1.01x
MapReduceShort 2017 2061 +2.2% 0.98x (?)
MapReduceShortString 22 21 -4.5% 1.05x
MapReduceString 82 81 -1.2% 1.01x
Memset 217 215 -0.9% 1.01x (?)
MonteCarloPi 42889 42924 +0.1% 1.00x (?)
NSDictionaryCastToSwift 5578 5577 -0.0% 1.00x (?)
NSError 308 307 -0.3% 1.00x (?)
NSStringConversion 318 323 +1.6% 0.98x
NibbleSort 4121 3964 -3.8% 1.04x
ObjectAllocation 183 183 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObject 20523 20971 +2.2% 0.98x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 4050 4223 +4.3% 0.96x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 33991 35202 +3.6% 0.97x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 128539 129675 +0.9% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObject 60767 61744 +1.6% 0.98x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4223 4365 +3.4% 0.97x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 70618 69384 -1.7% 1.02x (?)
ObjectiveCBridgeFromNSString 1320 1342 +1.7% 0.98x (?)
ObjectiveCBridgeStubDataAppend 3992 3965 -0.7% 1.01x (?)
ObjectiveCBridgeStubDateMutation 257 257 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 27786 28324 +1.9% 0.98x (?)
ObjectiveCBridgeStubFromNSDate 4132 4200 +1.6% 0.98x (?)
ObjectiveCBridgeStubFromNSString 850 827 -2.7% 1.03x
ObjectiveCBridgeStubFromNSStringRef 157 156 -0.6% 1.01x
ObjectiveCBridgeStubNSDataAppend 2536 2546 +0.4% 1.00x (?)
ObjectiveCBridgeStubNSDateMutationRef 13417 12834 -4.3% 1.05x (?)
ObjectiveCBridgeStubToArrayOfNSString 30291 29824 -1.5% 1.02x
ObjectiveCBridgeStubToNSDate 15333 15681 +2.3% 0.98x (?)
ObjectiveCBridgeStubToNSDateRef 3418 3436 +0.5% 0.99x (?)
ObjectiveCBridgeStubToNSString 1563 1543 -1.3% 1.01x (?)
ObjectiveCBridgeStubToNSStringRef 115 113 -1.7% 1.02x
ObjectiveCBridgeStubURLAppendPath 337432 326470 -3.2% 1.03x (?)
ObjectiveCBridgeStubURLAppendPathRef 347844 340039 -2.2% 1.02x
ObjectiveCBridgeToNSArray 30908 30760 -0.5% 1.00x (?)
ObjectiveCBridgeToNSDictionary 56587 58597 +3.6% 0.97x (?)
ObjectiveCBridgeToNSSet 47421 46354 -2.3% 1.02x (?)
ObjectiveCBridgeToNSString 1316 1313 -0.2% 1.00x (?)
ObserverClosure 2166 2163 -0.1% 1.00x (?)
ObserverForwarderStruct 996 1002 +0.6% 0.99x (?)
ObserverPartiallyAppliedMethod 3733 3764 +0.8% 0.99x (?)
ObserverUnappliedMethod 2364 2380 +0.7% 0.99x
OpenClose 252 263 +4.4% 0.96x
PartialApplyDynamicType 0 0 +0.0% 1.00x
Phonebook 4040 4123 +2.1% 0.98x
PolymorphicCalls 25 25 +0.0% 1.00x
PopFrontArray 1961 1944 -0.9% 1.01x (?)
PopFrontArrayGeneric 1956 1957 +0.1% 1.00x (?)
PopFrontUnsafePointer 9471 9426 -0.5% 1.00x (?)
PrefixAnyCollection 76 76 +0.0% 1.00x
PrefixAnySeqCntRange 71 71 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 71 71 +0.0% 1.00x
PrefixAnySequence 3797 3803 +0.2% 1.00x
PrefixAnySequenceLazy 3795 3810 +0.4% 1.00x
PrefixArray 35 35 +0.0% 1.00x
PrefixArrayLazy 35 35 +0.0% 1.00x
PrefixCountableRange 35 35 +0.0% 1.00x
PrefixCountableRangeLazy 35 35 +0.0% 1.00x
PrefixSequence 1325 1326 +0.1% 1.00x (?)
PrefixSequenceLazy 1415 1414 -0.1% 1.00x (?)
PrefixWhileAnyCollection 146 146 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 106 106 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 9441 9378 -0.7% 1.01x
PrefixWhileAnySeqCRangeIterLazy 106 106 +0.0% 1.00x
PrefixWhileAnySeqCntRange 142 142 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 106 106 +0.0% 1.00x
PrefixWhileAnySequence 10522 10438 -0.8% 1.01x
PrefixWhileAnySequenceLazy 1391 1392 +0.1% 1.00x (?)
PrefixWhileArray 105 105 +0.0% 1.00x
PrefixWhileArrayLazy 70 70 +0.0% 1.00x
PrefixWhileCountableRange 46 46 +0.0% 1.00x
PrefixWhileCountableRangeLazy 35 35 +0.0% 1.00x
PrefixWhileSequence 356 359 +0.8% 0.99x
PrefixWhileSequenceLazy 52 52 +0.0% 1.00x
Prims 761 754 -0.9% 1.01x
PrimsSplit 763 751 -1.6% 1.02x
RC4 164 168 +2.4% 0.98x
RGBHistogram 2940 2942 +0.1% 1.00x (?)
RGBHistogramOfObjects 23793 23799 +0.0% 1.00x (?)
RangeAssignment 355 353 -0.6% 1.01x (?)
RangeIterationSigned64 200 200 +0.0% 1.00x
RangeIterationUnsigned 200 200 +0.0% 1.00x
RangeReplaceableCollectionPlusDefault 981 984 +0.3% 1.00x (?)
RecursiveOwnedParameter 2351 2326 -1.1% 1.01x
ReversedArray 57 57 +0.0% 1.00x
ReversedBidirectional 15362 15349 -0.1% 1.00x
ReversedDictionary 133 133 +0.0% 1.00x
RomanNumbers 109727 114160 +4.0% 0.96x
SetExclusiveOr 3477 3451 -0.7% 1.01x (?)
SetExclusiveOr_OfObjects 8815 8851 +0.4% 1.00x (?)
SetIntersect 322 320 -0.6% 1.01x
SetIntersect_OfObjects 1797 1797 +0.0% 1.00x
SetIsSubsetOf 299 299 +0.0% 1.00x
SetIsSubsetOf_OfObjects 363 363 +0.0% 1.00x
SetUnion 3147 3152 +0.2% 1.00x (?)
SetUnion_OfObjects 7247 7261 +0.2% 1.00x (?)
SevenBoom 1556 1546 -0.6% 1.01x (?)
SortLargeExistentials 7043 7051 +0.1% 1.00x
SortLettersInPlace 1157 1159 +0.2% 1.00x (?)
SortStringsUnicode 15454 15558 +0.7% 0.99x (?)
StackPromo 22155 22235 +0.4% 1.00x
StaticArray 6 6 +0.0% 1.00x
StrComplexWalk 1564 1568 +0.3% 1.00x
StrToInt 2107 2172 +3.1% 0.97x
StringAdder 4277 4259 -0.4% 1.00x (?)
StringBuilder 1443 1447 +0.3% 1.00x (?)
StringBuilderLong 1110 1072 -3.4% 1.04x (?)
StringComparison_abnormal 863 865 +0.2% 1.00x (?)
StringComparison_ascii 945 992 +5.0% 0.95x
StringComparison_emoji 2564 2556 -0.3% 1.00x (?)
StringComparison_fastPrenormal 8724 8759 +0.4% 1.00x
StringComparison_latin1 6026 6024 -0.0% 1.00x
StringComparison_longSharedPrefix 11512 11530 +0.2% 1.00x (?)
StringComparison_nonBMPSlowestPrenormal 4697 4689 -0.2% 1.00x (?)
StringComparison_slowerPrenormal 4184 4193 +0.2% 1.00x
StringComparison_zalgo 1719 1727 +0.5% 1.00x (?)
StringEdits 117110 120202 +2.6% 0.97x
StringEnumRawValueInitialization 1006 980 -2.6% 1.03x
StringEqualPointerComparison 286 286 +0.0% 1.00x
StringFromLongWholeSubstring 21 21 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 10 10 +0.0% 1.00x
StringHasPrefixAscii 1575 1575 +0.0% 1.00x
StringHasPrefixUnicode 28430 28184 -0.9% 1.01x
StringHasSuffixAscii 1690 1718 +1.7% 0.98x
StringHasSuffixUnicode 85458 85873 +0.5% 1.00x
StringInterpolation 9351 9373 +0.2% 1.00x (?)
StringMatch 7361 7557 +2.7% 0.97x
StringRemoveDupes 1031 1025 -0.6% 1.01x (?)
StringUTF16Builder 2428 2419 -0.4% 1.00x (?)
StringWalk 1618 1608 -0.6% 1.01x
StringWithCString 43019 43196 +0.4% 1.00x
StringWordBuilder 1700 1746 +2.7% 0.97x
StringWordBuilderReservingCapacity 1270 1302 +2.5% 0.98x
SubstringComparable 2065 2061 -0.2% 1.00x (?)
SubstringEqualString 2133 2130 -0.1% 1.00x (?)
SubstringEquatable 3205 3207 +0.1% 1.00x (?)
SubstringFromLongString 10 10 +0.0% 1.00x
SubstringFromLongStringGeneric 69 69 +0.0% 1.00x
SuffixAnyCollection 28 28 +0.0% 1.00x
SuffixAnyCollectionLazy 23383 22756 -2.7% 1.03x (?)
SuffixAnySeqCRangeIter 3854 3827 -0.7% 1.01x
SuffixAnySeqCRangeIterLazy 3861 3829 -0.8% 1.01x
SuffixAnySeqCntRange 23 23 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 23 23 +0.0% 1.00x
SuffixAnySequence 5109 5091 -0.4% 1.00x
SuffixAnySequenceLazy 5224 5169 -1.1% 1.01x
SuffixCountableRange 11 11 +0.0% 1.00x
SuffixSequence 3754 3785 +0.8% 0.99x
SuffixSequenceLazy 3832 3765 -1.7% 1.02x (?)
SuperChars 41692 43366 +4.0% 0.96x (?)
TwoSum 992 1000 +0.8% 0.99x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 313 319 +1.9% 0.98x
Walsh 418 414 -1.0% 1.01x
WordCountHistogramASCII 8208 8273 +0.8% 0.99x
WordCountHistogramUTF16 57808 55573 -3.9% 1.04x (?)
WordCountUniqueASCII 1764 1806 +2.4% 0.98x
WordCountUniqueUTF16 25161 25433 +1.1% 0.99x (?)
WordSplitASCII 21617 21233 -1.8% 1.02x (?)
WordSplitUTF16 22781 22491 -1.3% 1.01x (?)
XorLoop 395 396 +0.3% 1.00x (?)

Unoptimized (Onone)

Regression (61)
TEST OLD NEW DELTA SPEEDUP
DropLastAnySeqCntRange 4756 5956 +25.2% 0.80x
CharIteration_punctuated_unicodeScalars 35176 44043 +25.2% 0.80x
CharIteration_utf16_unicodeScalars 131347 164333 +25.1% 0.80x (?)
SuffixAnySeqCntRange 4759 5953 +25.1% 0.80x
PrefixAnyCollection 14145 17687 +25.0% 0.80x
PrefixAnySeqCntRangeLazy 14055 17564 +25.0% 0.80x
DropWhileAnyCollectionLazy 20112 25130 +25.0% 0.80x
DropLastAnyCollection 4716 5872 +24.5% 0.80x (?)
SuffixAnyCollection 4727 5880 +24.4% 0.80x (?)
DropWhileAnySeqCntRangeLazy 20107 24987 +24.3% 0.80x
DropWhileAnySeqCRangeIterLazy 20219 25097 +24.1% 0.81x
DropFirstAnySeqCntRangeLazy 14075 17428 +23.8% 0.81x
DropFirstAnyCollection 14086 17441 +23.8% 0.81x
SuffixAnySeqCntRangeLazy 4710 5825 +23.7% 0.81x
DropLastAnySeqCntRangeLazy 4723 5821 +23.2% 0.81x
DropFirstAnySeqCntRange 14151 17439 +23.2% 0.81x
DropWhileCountableRangeLazy 19665 24230 +23.2% 0.81x
PrefixAnySeqCntRange 14243 17396 +22.1% 0.82x
LazilyFilteredRange 486996 588597 +20.9% 0.83x (?)
PrefixWhileCountableRangeLazy 16612 20075 +20.8% 0.83x
DropWhileAnyCollection 18090 21739 +20.2% 0.83x
PrefixAnySeqCRangeIterLazy 17759 21299 +19.9% 0.83x
PrefixAnySeqCRangeIter 17898 21428 +19.7% 0.84x
PrefixWhileAnySeqCRangeIterLazy 17029 20344 +19.5% 0.84x
DropWhileAnySeqCntRange 18149 21588 +18.9% 0.84x
CharIteration_korean_unicodeScalars 150184 177816 +18.4% 0.84x (?)
PrefixWhileAnyCollectionLazy 16949 20048 +18.3% 0.85x (?)
RangeIterationSigned64 40685 48031 +18.1% 0.85x (?)
PrefixCountableRangeLazy 29486 34588 +17.3% 0.85x (?)
DropFirstCountableRangeLazy 29502 34572 +17.2% 0.85x
PrefixWhileAnySeqCntRangeLazy 17180 19967 +16.2% 0.86x (?)
SuffixCountableRangeLazy 9929 11530 +16.1% 0.86x
DropLastCountableRangeLazy 9982 11574 +15.9% 0.86x
DropFirstAnySeqCRangeIter 25655 29539 +15.1% 0.87x
DropFirstAnySeqCRangeIterLazy 25480 29282 +14.9% 0.87x
DropLastAnySeqCRangeIter 38687 43939 +13.6% 0.88x
SuffixAnySeqCRangeIterLazy 34860 39510 +13.3% 0.88x
StringFromLongWholeSubstringGeneric 210 238 +13.3% 0.88x
PrefixWhileAnySeqCntRange 26004 29465 +13.3% 0.88x
DictionaryGroup 4383 4963 +13.2% 0.88x
SuffixAnySeqCRangeIter 34753 39257 +13.0% 0.89x
PrefixWhileAnyCollection 26024 29336 +12.7% 0.89x
AngryPhonebook 5132 5762 +12.3% 0.89x
PrefixAnyCollectionLazy 103246 115846 +12.2% 0.89x
ObjectiveCBridgeFromNSSetAnyObjectToString 78819 88399 +12.2% 0.89x
DropWhileAnySeqCRangeIter 24050 26906 +11.9% 0.89x
DropLastAnySeqCRangeIterLazy 38699 43229 +11.7% 0.90x
RangeIterationUnsigned 36482 40657 +11.4% 0.90x (?)
ObjectiveCBridgeStubToNSDate 14709 16319 +10.9% 0.90x
PrefixWhileAnySeqCRangeIter 33967 37528 +10.5% 0.91x
StackPromo 88638 97904 +10.5% 0.91x (?)
TypeFlood 160 176 +10.0% 0.91x (?)
CharIndexing_russian_unicodeScalars_Backwards 390554 429403 +9.9% 0.91x
ObjectiveCBridgeFromNSArrayAnyObjectForced 8611 9364 +8.7% 0.92x (?)
CharIteration_korean_unicodeScalars_Backwards 338841 368118 +8.6% 0.92x (?)
StringEqualPointerComparison 3150 3408 +8.2% 0.92x
ObjectiveCBridgeStubFromArrayOfNSString 27480 29693 +8.1% 0.93x (?)
DropFirstArrayLazy 26228 28260 +7.7% 0.93x
PrefixArrayLazy 26225 28020 +6.8% 0.94x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 82561 88114 +6.7% 0.94x
Calculator 1637 1743 +6.5% 0.94x
Improvement (10)
TEST OLD NEW DELTA SPEEDUP
PopFrontArray 6836 4630 -32.3% 1.48x
CharIteration_tweet_unicodeScalars 401223 309238 -22.9% 1.30x (?)
SuperChars 260534 222832 -14.5% 1.17x (?)
Combos 2304 2140 -7.1% 1.08x (?)
CharIteration_russian_unicodeScalars_Backwards 331816 308264 -7.1% 1.08x
CharIndexing_japanese_unicodeScalars_Backwards 631941 587187 -7.1% 1.08x
PrefixWhileArray 12452 11654 -6.4% 1.07x
CharIteration_utf16_unicodeScalars_Backwards 300841 284620 -5.4% 1.06x
CharIndexing_russian_unicodeScalars 364963 345643 -5.3% 1.06x (?)
ArrayOfGenericPOD2 1130 1072 -5.1% 1.05x
No Changes (284)
TEST OLD NEW DELTA SPEEDUP
AnyHashableWithAClass 86550 87389 +1.0% 0.99x
Array2D 633210 633718 +0.1% 1.00x
ArrayAppend 4896 4891 -0.1% 1.00x (?)
ArrayAppendArrayOfInt 847 861 +1.7% 0.98x (?)
ArrayAppendAscii 40426 40345 -0.2% 1.00x
ArrayAppendFromGeneric 865 867 +0.2% 1.00x (?)
ArrayAppendGenericStructs 1497 1502 +0.3% 1.00x (?)
ArrayAppendLatin1 63975 63936 -0.1% 1.00x
ArrayAppendLazyMap 168232 166985 -0.7% 1.01x (?)
ArrayAppendOptionals 1488 1498 +0.7% 0.99x (?)
ArrayAppendRepeatCol 170884 173992 +1.8% 0.98x
ArrayAppendReserved 4509 4511 +0.0% 1.00x (?)
ArrayAppendSequence 142639 142906 +0.2% 1.00x
ArrayAppendStrings 15439 15439 +0.0% 1.00x
ArrayAppendToFromGeneric 866 872 +0.7% 0.99x (?)
ArrayAppendToGeneric 866 872 +0.7% 0.99x
ArrayAppendUTF16 64323 64124 -0.3% 1.00x (?)
ArrayInClass 6135 6165 +0.5% 1.00x (?)
ArrayLiteral 1792 1800 +0.4% 1.00x (?)
ArrayOfGenericRef 10149 10097 -0.5% 1.01x (?)
ArrayOfPOD 756 756 +0.0% 1.00x
ArrayOfRef 9308 9248 -0.6% 1.01x
ArrayPlusEqualArrayOfInt 865 864 -0.1% 1.00x (?)
ArrayPlusEqualFiveElementCollection 232222 231684 -0.2% 1.00x (?)
ArrayPlusEqualSingleElementCollection 229222 229274 +0.0% 1.00x (?)
ArrayPlusEqualThreeElements 9230 9204 -0.3% 1.00x (?)
ArraySubscript 81224 81647 +0.5% 0.99x
ArrayValueProp 3631 3616 -0.4% 1.00x
ArrayValueProp2 17303 17252 -0.3% 1.00x (?)
ArrayValueProp3 4132 4118 -0.3% 1.00x (?)
ArrayValueProp4 4073 4059 -0.3% 1.00x (?)
BinaryFloatingPointConversionFromBinaryInteger 6049 6041 -0.1% 1.00x (?)
BitCount 2102 2100 -0.1% 1.00x (?)
ByteSwap 3922 3930 +0.2% 1.00x (?)
COWTree 11825 11290 -4.5% 1.05x (?)
CStringLongAscii 4608 4762 +3.3% 0.97x
CStringLongNonAscii 2105 2089 -0.8% 1.01x (?)
CStringShortAscii 7594 7951 +4.7% 0.96x (?)
CaptureProp 339741 340875 +0.3% 1.00x (?)
CharIndexing_ascii_unicodeScalars 424668 425490 +0.2% 1.00x (?)
CharIndexing_ascii_unicodeScalars_Backwards 472825 495975 +4.9% 0.95x (?)
CharIndexing_chinese_unicodeScalars 323280 319332 -1.2% 1.01x (?)
CharIndexing_chinese_unicodeScalars_Backwards 356278 370769 +4.1% 0.96x (?)
CharIndexing_japanese_unicodeScalars 520760 523607 +0.5% 0.99x (?)
CharIndexing_korean_unicodeScalars 406890 427877 +5.2% 0.95x
CharIndexing_korean_unicodeScalars_Backwards 458647 480510 +4.8% 0.95x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 74014 73779 -0.3% 1.00x (?)
CharIndexing_punctuated_unicodeScalars 95488 99646 +4.4% 0.96x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 105067 109672 +4.4% 0.96x (?)
CharIndexing_tweet_unicodeScalars 831348 829385 -0.2% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 949044 990930 +4.4% 0.96x
CharIndexing_utf16_unicodeScalars 338373 342322 +1.2% 0.99x (?)
CharIndexing_utf16_unicodeScalars_Backwards 378004 378654 +0.2% 1.00x (?)
CharIteration_ascii_unicodeScalars 156187 155795 -0.3% 1.00x (?)
CharIteration_ascii_unicodeScalars_Backwards 368536 376171 +2.1% 0.98x (?)
CharIteration_chinese_unicodeScalars 117408 117873 +0.4% 1.00x (?)
CharIteration_chinese_unicodeScalars_Backwards 267515 278681 +4.2% 0.96x (?)
CharIteration_japanese_unicodeScalars 185259 186087 +0.4% 1.00x (?)
CharIteration_japanese_unicodeScalars_Backwards 437918 435659 -0.5% 1.01x (?)
CharIteration_punctuatedJapanese_unicodeScalars 28132 28445 +1.1% 0.99x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 63085 61365 -2.7% 1.03x (?)
CharIteration_punctuated_unicodeScalars_Backwards 80896 82293 +1.7% 0.98x (?)
CharIteration_russian_unicodeScalars 128964 129694 +0.6% 0.99x (?)
CharIteration_tweet_unicodeScalars_Backwards 696233 728882 +4.7% 0.96x (?)
CharacterLiteralsLarge 6017 6030 +0.2% 1.00x (?)
CharacterLiteralsSmall 708 708 +0.0% 1.00x
CharacterPropertiesFetch 5512 5569 +1.0% 0.99x (?)
CharacterPropertiesPrecomputed 4305 4326 +0.5% 1.00x (?)
CharacterPropertiesStashed 2377 2350 -1.1% 1.01x (?)
CharacterPropertiesStashedMemo 5091 4980 -2.2% 1.02x
Chars 40098 39504 -1.5% 1.02x
ClassArrayGetter 986 988 +0.2% 1.00x
DictOfArraysToArrayOfDicts 3475 3466 -0.3% 1.00x (?)
Dictionary 2644 2700 +2.1% 0.98x (?)
Dictionary2 2825 2845 +0.7% 0.99x (?)
Dictionary2OfObjects 5468 5683 +3.9% 0.96x (?)
Dictionary3 1258 1281 +1.8% 0.98x (?)
Dictionary3OfObjects 2249 2264 +0.7% 0.99x (?)
DictionaryBridge 2145 2172 +1.3% 0.99x (?)
DictionaryGroupOfObjects 7484 7619 +1.8% 0.98x (?)
DictionaryLiteral 8524 8470 -0.6% 1.01x (?)
DictionaryOfObjects 6374 6079 -4.6% 1.05x
DictionaryRemove 18180 18144 -0.2% 1.00x (?)
DictionaryRemoveOfObjects 49848 50350 +1.0% 0.99x (?)
DictionarySubscriptDefaultMutation 2111 2109 -0.1% 1.00x (?)
DictionarySubscriptDefaultMutationArray 2397 2399 +0.1% 1.00x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 9096 9067 -0.3% 1.00x (?)
DictionarySubscriptDefaultMutationOfObjects 5565 5593 +0.5% 0.99x (?)
DictionarySwap 5210 5236 +0.5% 1.00x
DictionarySwapOfObjects 22385 22838 +2.0% 0.98x (?)
DoubleWidthDivision 1926095 1925511 -0.0% 1.00x (?)
DropFirstAnyCollectionLazy 106559 109085 +2.4% 0.98x (?)
DropFirstAnySequence 10896 10930 +0.3% 1.00x (?)
DropFirstAnySequenceLazy 11006 10999 -0.1% 1.00x (?)
DropFirstArray 3758 3740 -0.5% 1.00x (?)
DropFirstCountableRange 326 327 +0.3% 1.00x
DropFirstSequence 10605 10609 +0.0% 1.00x (?)
DropFirstSequenceLazy 10651 10638 -0.1% 1.00x (?)
DropLastAnyCollectionLazy 35804 36805 +2.8% 0.97x (?)
DropLastAnySequence 29231 29092 -0.5% 1.00x
DropLastAnySequenceLazy 29157 28795 -1.2% 1.01x
DropLastCountableRange 113 114 +0.9% 0.99x
DropLastSequence 29139 29044 -0.3% 1.00x (?)
DropLastSequenceLazy 29389 29240 -0.5% 1.01x (?)
DropWhileAnySequence 12347 12402 +0.4% 1.00x (?)
DropWhileAnySequenceLazy 10525 10608 +0.8% 0.99x
DropWhileArrayLazy 14736 14603 -0.9% 1.01x
DropWhileCountableRange 4329 4351 +0.5% 0.99x
DropWhileSequence 12089 12079 -0.1% 1.00x (?)
DropWhileSequenceLazy 9981 10118 +1.4% 0.99x
EqualStringSubstring 476 477 +0.2% 1.00x (?)
EqualSubstringString 477 478 +0.2% 1.00x (?)
EqualSubstringSubstring 479 479 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 484 485 +0.2% 1.00x
ErrorHandling 7508 7397 -1.5% 1.02x (?)
ExclusivityGlobal 183 189 +3.3% 0.97x
ExclusivityIndependent 67 70 +4.5% 0.96x (?)
FilterEvenUsingReduce 3736 3765 +0.8% 0.99x (?)
FilterEvenUsingReduceInto 1971 1987 +0.8% 0.99x (?)
FrequenciesUsingReduce 10581 10572 -0.1% 1.00x (?)
FrequenciesUsingReduceInto 5501 5463 -0.7% 1.01x
Hanoi 19973 20010 +0.2% 1.00x (?)
HashTest 16740 17207 +2.8% 0.97x (?)
Histogram 6556 6536 -0.3% 1.00x
Integrate 823 820 -0.4% 1.00x
IterateData 7885 7878 -0.1% 1.00x (?)
Join 1107 1107 +0.0% 1.00x
LazilyFilteredArrayContains 787005 782540 -0.6% 1.01x
LazilyFilteredArrays 1478554 1478160 -0.0% 1.00x (?)
LessSubstringSubstring 478 479 +0.2% 1.00x (?)
LessSubstringSubstringGenericComparable 483 483 +0.0% 1.00x
LinkedList 32063 32063 +0.0% 1.00x
LuhnAlgoEager 5062 5280 +4.3% 0.96x
LuhnAlgoLazy 5207 5159 -0.9% 1.01x (?)
MapReduce 27569 27225 -1.2% 1.01x (?)
MapReduceAnyCollection 27569 27999 +1.6% 0.98x
MapReduceAnyCollectionShort 40338 39897 -1.1% 1.01x (?)
MapReduceClass 32308 32316 +0.0% 1.00x (?)
MapReduceClassShort 44403 43170 -2.8% 1.03x (?)
MapReduceLazyCollection 23785 23487 -1.3% 1.01x (?)
MapReduceLazyCollectionShort 35137 35083 -0.2% 1.00x (?)
MapReduceLazySequence 18411 18651 +1.3% 0.99x
MapReduceSequence 31748 31779 +0.1% 1.00x (?)
MapReduceShort 39144 39890 +1.9% 0.98x
MapReduceShortString 250 251 +0.4% 1.00x (?)
MapReduceString 1938 1952 +0.7% 0.99x
Memset 44488 44484 -0.0% 1.00x (?)
MonteCarloE 890369 901519 +1.3% 0.99x
MonteCarloPi 3886488 3903743 +0.4% 1.00x
NSDictionaryCastToSwift 6758 6854 +1.4% 0.99x (?)
NSError 731 711 -2.7% 1.03x (?)
NSStringConversion 361 360 -0.3% 1.00x
NibbleSort 302003 303477 +0.5% 1.00x (?)
NopDeinit 162143 167820 +3.5% 0.97x
ObjectAllocation 1356 1424 +5.0% 0.95x
ObjectiveCBridgeFromNSArrayAnyObject 23135 22896 -1.0% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 43347 42795 -1.3% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 35969 36671 +2.0% 0.98x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 133187 132233 -0.7% 1.01x (?)
ObjectiveCBridgeFromNSSetAnyObject 68712 65957 -4.0% 1.04x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 7452 7390 -0.8% 1.01x (?)
ObjectiveCBridgeFromNSString 3194 3177 -0.5% 1.01x (?)
ObjectiveCBridgeFromNSStringForced 2748 2735 -0.5% 1.00x (?)
ObjectiveCBridgeStubDataAppend 4486 4662 +3.9% 0.96x
ObjectiveCBridgeStubDateMutation 659 663 +0.6% 0.99x (?)
ObjectiveCBridgeStubFromNSDate 4946 4996 +1.0% 0.99x
ObjectiveCBridgeStubFromNSString 913 915 +0.2% 1.00x (?)
ObjectiveCBridgeStubFromNSStringRef 211 211 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2950 3089 +4.7% 0.96x (?)
ObjectiveCBridgeStubNSDateMutationRef 15923 16122 +1.2% 0.99x (?)
ObjectiveCBridgeStubToArrayOfNSString 29639 29858 +0.7% 0.99x (?)
ObjectiveCBridgeStubToNSDateRef 3488 3474 -0.4% 1.00x (?)
ObjectiveCBridgeStubToNSString 1588 1581 -0.4% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 167 167 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath 333568 344163 +3.2% 0.97x (?)
ObjectiveCBridgeStubURLAppendPathRef 354290 342554 -3.3% 1.03x (?)
ObjectiveCBridgeToNSArray 30433 30340 -0.3% 1.00x (?)
ObjectiveCBridgeToNSDictionary 59727 58920 -1.4% 1.01x
ObjectiveCBridgeToNSSet 48674 48626 -0.1% 1.00x (?)
ObjectiveCBridgeToNSString 1345 1344 -0.1% 1.00x (?)
ObserverClosure 6343 6326 -0.3% 1.00x
ObserverForwarderStruct 4411 4374 -0.8% 1.01x
ObserverPartiallyAppliedMethod 7841 7790 -0.7% 1.01x (?)
ObserverUnappliedMethod 7956 7930 -0.3% 1.00x (?)
OpenClose 577 563 -2.4% 1.02x
PartialApplyDynamicType 41767 41413 -0.8% 1.01x (?)
Phonebook 20456 20988 +2.6% 0.97x
PointerArithmetics 114602 114657 +0.0% 1.00x (?)
PolymorphicCalls 6090 6390 +4.9% 0.95x (?)
PopFrontArrayGeneric 5850 5838 -0.2% 1.00x (?)
PopFrontUnsafePointer 11200 11299 +0.9% 0.99x (?)
PrefixAnySequence 9066 9053 -0.1% 1.00x (?)
PrefixAnySequenceLazy 9183 9216 +0.4% 1.00x
PrefixArray 3773 3738 -0.9% 1.01x (?)
PrefixCountableRange 327 327 +0.0% 1.00x
PrefixSequence 8819 8741 -0.9% 1.01x
PrefixSequenceLazy 8989 9019 +0.3% 1.00x (?)
PrefixWhileAnySequence 26657 26819 +0.6% 0.99x (?)
PrefixWhileAnySequenceLazy 9242 9240 -0.0% 1.00x (?)
PrefixWhileArrayLazy 12965 13100 +1.0% 0.99x
PrefixWhileCountableRange 12224 12268 +0.4% 1.00x
PrefixWhileSequence 26379 26187 -0.7% 1.01x
PrefixWhileSequenceLazy 9035 9087 +0.6% 0.99x
Prims 9777 9649 -1.3% 1.01x (?)
PrimsSplit 9996 9656 -3.4% 1.04x
RC4 16769 16708 -0.4% 1.00x (?)
RGBHistogram 27093 26998 -0.4% 1.00x (?)
RGBHistogramOfObjects 96734 97098 +0.4% 1.00x (?)
RangeAssignment 2705 2726 +0.8% 0.99x (?)
RangeIterationSigned 16512 16813 +1.8% 0.98x
RangeReplaceableCollectionPlusDefault 8404 8723 +3.8% 0.96x (?)
RecursiveOwnedParameter 7831 7840 +0.1% 1.00x (?)
ReversedArray 12968 13002 +0.3% 1.00x (?)
ReversedBidirectional 41737 42093 +0.9% 0.99x (?)
ReversedDictionary 23439 23132 -1.3% 1.01x
RomanNumbers 1196600 1214895 +1.5% 0.98x
SetExclusiveOr 17327 17218 -0.6% 1.01x
SetExclusiveOr_OfObjects 41693 41804 +0.3% 1.00x (?)
SetIntersect 8246 8183 -0.8% 1.01x
SetIntersect_OfObjects 12097 12129 +0.3% 1.00x
SetIsSubsetOf 1340 1340 +0.0% 1.00x
SetIsSubsetOf_OfObjects 1551 1561 +0.6% 0.99x (?)
SetUnion 11919 11842 -0.6% 1.01x (?)
SetUnion_OfObjects 29109 29137 +0.1% 1.00x (?)
SevenBoom 1712 1687 -1.5% 1.01x (?)
Sim2DArray 43633 43608 -0.1% 1.00x (?)
SortLargeExistentials 15722 15660 -0.4% 1.00x (?)
SortLettersInPlace 2855 2876 +0.7% 0.99x
SortSortedStrings 1381 1412 +2.2% 0.98x (?)
SortStrings 2575 2620 +1.7% 0.98x
SortStringsUnicode 16682 16448 -1.4% 1.01x
StaticArray 2665 2662 -0.1% 1.00x (?)
StrComplexWalk 6697 6670 -0.4% 1.00x
StrToInt 57535 57261 -0.5% 1.00x (?)
StringAdder 4758 4759 +0.0% 1.00x (?)
StringBuilder 6953 6779 -2.5% 1.03x (?)
StringBuilderLong 2705 2728 +0.9% 0.99x (?)
StringComparison_abnormal 1482 1424 -3.9% 1.04x (?)
StringComparison_ascii 9728 9777 +0.5% 0.99x
StringComparison_emoji 3823 3814 -0.2% 1.00x (?)
StringComparison_fastPrenormal 13456 13332 -0.9% 1.01x (?)
StringComparison_latin1 9938 9569 -3.7% 1.04x (?)
StringComparison_longSharedPrefix 13613 13097 -3.8% 1.04x
StringComparison_nonBMPSlowestPrenormal 6903 6916 +0.2% 1.00x (?)
StringComparison_slowerPrenormal 7054 6866 -2.7% 1.03x
StringComparison_zalgo 2864 2875 +0.4% 1.00x (?)
StringEdits 352866 350328 -0.7% 1.01x (?)
StringEnumRawValueInitialization 20922 21280 +1.7% 0.98x (?)
StringFromLongWholeSubstring 22 22 +0.0% 1.00x
StringHasPrefixAscii 3048 3042 -0.2% 1.00x
StringHasPrefixUnicode 30995 30999 +0.0% 1.00x (?)
StringHasSuffixAscii 3181 3237 +1.8% 0.98x
StringHasSuffixUnicode 88262 88418 +0.2% 1.00x
StringInterpolation 13293 13402 +0.8% 0.99x (?)
StringMatch 33097 33231 +0.4% 1.00x (?)
StringRemoveDupes 1426 1452 +1.8% 0.98x
StringUTF16Builder 7619 7659 +0.5% 0.99x (?)
StringWalk 12781 13402 +4.9% 0.95x
StringWithCString 37605 39423 +4.8% 0.95x
StringWordBuilder 2512 2515 +0.1% 1.00x (?)
StringWordBuilderReservingCapacity 2181 2178 -0.1% 1.00x (?)
SubstringComparable 4227 4174 -1.3% 1.01x (?)
SubstringEqualString 3498 3489 -0.3% 1.00x (?)
SubstringEquatable 8111 8072 -0.5% 1.00x (?)
SubstringFromLongString 26 26 +0.0% 1.00x
SubstringFromLongStringGeneric 103 103 +0.0% 1.00x
SuffixAnyCollectionLazy 36211 37934 +4.8% 0.95x
SuffixAnySequence 25232 25131 -0.4% 1.00x
SuffixAnySequenceLazy 25291 25337 +0.2% 1.00x (?)
SuffixCountableRange 114 115 +0.9% 0.99x
SuffixSequence 25077 25000 -0.3% 1.00x (?)
SuffixSequenceLazy 25333 25053 -1.1% 1.01x (?)
SumUsingReduce 177036 169846 -4.1% 1.04x
SumUsingReduceInto 166396 166418 +0.0% 1.00x (?)
TwoSum 3905 3921 +0.4% 1.00x (?)
UTF8Decode 30218 29937 -0.9% 1.01x
Walsh 12062 12020 -0.3% 1.00x
WordCountHistogramASCII 48304 48594 +0.6% 0.99x (?)
WordCountHistogramUTF16 105249 103642 -1.5% 1.02x (?)
WordCountUniqueASCII 7943 8016 +0.9% 0.99x (?)
WordCountUniqueUTF16 35204 35838 +1.8% 0.98x (?)
WordSplitASCII 26086 26087 +0.0% 1.00x (?)
WordSplitUTF16 28003 27426 -2.1% 1.02x
XorLoop 23395 23363 -0.1% 1.00x (?)
Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

@airspeedswift
Copy link
Member Author

@lancep @jrose-apple I still can't reproduce the original problem. I'm hoping it was a miscompile and this doesn't have the same issue, but if I'm wrong, we can insta-revert. But if this goes through, I can file the other one as a jira for the optimizer.

@airspeedswift airspeedswift merged commit dd5e6b6 into swiftlang:master Jan 31, 2018
@jrose-apple
Copy link
Contributor

The original problem came up when running the test suite with --param swift_test_mode=optimize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants