Skip to content

Streamline integer-range randomElement. #16501

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

Conversation

stephentyrone
Copy link
Contributor

This is a small performance win; mainly I'm interested in simplifying the code so that there are fewer weird corners for bugs to creep in. Nonetheless, it seems to be about 5% faster with the (fast, dumb) LCG generator.

This is likely to be a larger perf win when working with hypothetical integer types bigger than the builtin ones, because it removes a lot of stuff that the optimizer is unlikely to be able to reason about with more general types.

This is a small performance win; mainly I'm interested in simplifying the code so that there are fewer weird corners for bugs to creep in. Nonetheless, it seems to be about 5% faster with the (fast, dumb) LCG generator.
@stephentyrone
Copy link
Contributor Author

@swift-ci Please test.

@stephentyrone
Copy link
Contributor Author

Tagging @Azoy because I can't directly add him as a reviewer.

@Azoy
Copy link
Contributor

Azoy commented May 10, 2018

Im not sure if tests fail on warnings, but since open range delta is never mutated, it will spit out a warning wanting let.

Copy link
Member

@natecook1000 natecook1000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, my wrapping arithmetic skills did not get me here 👏👏👏

@stephentyrone
Copy link
Contributor Author

@Azoy At least running locally it does not cause a real problem, but if we want to try to get rid of warnings, I'll put some hack in here.

@stephentyrone
Copy link
Contributor Author

stephentyrone commented May 10, 2018

@natecook1000 Steve's One Key Fact Of Wrapping Arithmetic:

If:

  • the only things you use are init(truncatingBitPattern:), &+, and &-
  • the types you're working with always have enough bits to differentiate the values you care about, and
  • you can prove that the desired result is representable

you are guaranteed to get the right answer in the end, no matter how many times you overflowed in-between.

&* is safe too, if the high-part of the product is entirely above the bits used for the eventual result.

@airspeedswift
Copy link
Member

@swift-ci please smoke benchmark

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (21)
TEST OLD NEW DELTA SPEEDUP
Sim2DArray 373 600 +60.9% 0.62x
BinaryFloatingPointPropertiesBinade 23 28 +21.7% 0.82x
ChainedFilterMap 1120 1264 +12.9% 0.89x
DataReplaceMedium 10917 12240 +12.1% 0.89x
Chars 980 1090 +11.2% 0.90x
ObjectiveCBridgeFromNSArrayAnyObjectForced 4183 4593 +9.8% 0.91x
PointerArithmetics 28263 30830 +9.1% 0.92x
DataReplaceMediumBuffer 13197 14339 +8.7% 0.92x (?)
StringBuilderWithLongSubstring 1360 1477 +8.6% 0.92x (?)
MapReduce 333 361 +8.4% 0.92x
RC4 134 145 +8.2% 0.92x
CharIndexing_tweet_unicodeScalars 27922 30073 +7.7% 0.93x
CharIndexing_japanese_unicodeScalars 17272 18584 +7.6% 0.93x
CharIndexing_russian_unicodeScalars 12028 12936 +7.5% 0.93x
CharIndexing_chinese_unicodeScalars 10937 11755 +7.5% 0.93x
CharIndexing_korean_unicodeScalars 14003 15049 +7.5% 0.93x
CharIndexing_ascii_unicodeScalars 14449 15525 +7.4% 0.93x
CharIndexing_punctuated_unicodeScalars 3281 3508 +6.9% 0.94x
CharIndexing_punctuatedJapanese_unicodeScalars 2630 2801 +6.5% 0.94x
BinaryFloatingPointPropertiesUlp 31 33 +6.5% 0.94x
CharIteration_tweet_unicodeScalars 35897 37939 +5.7% 0.95x
Improvement (23)
TEST OLD NEW DELTA SPEEDUP
ObjectiveCBridgeStubFromNSDate 6623 5472 -17.4% 1.21x
RangeIterationSigned 179 154 -14.0% 1.16x
NopDeinit 31381 27066 -13.8% 1.16x
ObjectiveCBridgeStubFromArrayOfNSString 35527 30688 -13.6% 1.16x
StaticArray 10 9 -10.0% 1.11x
MapReduceLazyCollectionShort 33 30 -9.1% 1.10x
CharIteration_utf16_unicodeScalars_Backwards 17464 15983 -8.5% 1.09x
DictionaryBridge 1146 1054 -8.0% 1.09x
CharIteration_japanese_unicodeScalars_Backwards 16729 15435 -7.7% 1.08x
CharIteration_chinese_unicodeScalars_Backwards 10581 9767 -7.7% 1.08x
MapReduceAnyCollection 390 360 -7.7% 1.08x
CharIteration_korean_unicodeScalars_Backwards 13547 12508 -7.7% 1.08x
CharIteration_ascii_unicodeScalars_Backwards 13969 12900 -7.7% 1.08x
CharIteration_russian_unicodeScalars_Backwards 11633 10744 -7.6% 1.08x
CharIteration_punctuated_unicodeScalars_Backwards 3166 2934 -7.3% 1.08x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2532 2348 -7.3% 1.08x
CharIteration_tweet_unicodeScalars_Backwards 27599 25784 -6.6% 1.07x
ObjectiveCBridgeFromNSDictionaryAnyObject 107153 100888 -5.8% 1.06x (?)
WordSplitASCII 6600 6219 -5.8% 1.06x
SuffixAnyCollectionLazy 19731 18649 -5.5% 1.06x (?)
Hanoi 2067 1954 -5.5% 1.06x
ObjectiveCBridgeToNSDictionary 25321 23985 -5.3% 1.06x (?)
CStringLongAscii 4382 4159 -5.1% 1.05x
No Changes (391)
TEST OLD NEW DELTA SPEEDUP
AngryPhonebook 3567 3713 +4.1% 0.96x (?)
AnyHashableWithAClass 76061 75767 -0.4% 1.00x
Array2D 2553 2550 -0.1% 1.00x (?)
ArrayAppend 978 977 -0.1% 1.00x (?)
ArrayAppendArrayOfInt 675 676 +0.1% 1.00x (?)
ArrayAppendAscii 3572 3523 -1.4% 1.01x
ArrayAppendAsciiSubstring 143281 141528 -1.2% 1.01x (?)
ArrayAppendFromGeneric 676 676 +0.0% 1.00x
ArrayAppendGenericStructs 1213 1211 -0.2% 1.00x
ArrayAppendLatin1 36181 35923 -0.7% 1.01x
ArrayAppendLatin1Substring 252983 261735 +3.5% 0.97x
ArrayAppendLazyMap 1178 1179 +0.1% 1.00x (?)
ArrayAppendOptionals 1209 1213 +0.3% 1.00x
ArrayAppendRepeatCol 1177 1178 +0.1% 1.00x
ArrayAppendReserved 747 750 +0.4% 1.00x
ArrayAppendSequence 982 983 +0.1% 1.00x
ArrayAppendStrings 5561 5569 +0.1% 1.00x
ArrayAppendToFromGeneric 677 675 -0.3% 1.00x (?)
ArrayAppendToGeneric 675 676 +0.1% 1.00x (?)
ArrayAppendUTF16 36271 35305 -2.7% 1.03x
ArrayAppendUTF16Substring 255552 264200 +3.4% 0.97x
ArrayInClass 77 77 +0.0% 1.00x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD2 130 130 +0.0% 1.00x
ArrayOfGenericRef 3932 3928 -0.1% 1.00x (?)
ArrayOfPOD 156 156 +0.0% 1.00x
ArrayOfRef 3979 3976 -0.1% 1.00x (?)
ArrayPlusEqualArrayOfInt 675 675 +0.0% 1.00x
ArrayPlusEqualFiveElementCollection 4869 4872 +0.1% 1.00x (?)
ArrayPlusEqualSingleElementCollection 979 979 +0.0% 1.00x
ArrayPlusEqualThreeElements 1486 1496 +0.7% 0.99x (?)
ArraySubscript 1397 1382 -1.1% 1.01x (?)
ArrayValueProp 7 7 +0.0% 1.00x
ArrayValueProp2 7 7 +0.0% 1.00x
ArrayValueProp3 7 7 +0.0% 1.00x
ArrayValueProp4 7 7 +0.0% 1.00x
BinaryFloatingPointPropertiesNextUp 25 25 +0.0% 1.00x
BitCount 181 189 +4.4% 0.96x
ByteSwap 95 93 -2.1% 1.02x
COWTree 4874 4918 +0.9% 0.99x (?)
CSVParsing 653891 654479 +0.1% 1.00x (?)
CSVParsingAlt 696927 698405 +0.2% 1.00x (?)
CSVParsingAltIndices 316117 317438 +0.4% 1.00x
CStringLongNonAscii 2015 1948 -3.3% 1.03x
CStringShortAscii 2925 2853 -2.5% 1.03x (?)
Calculator 1036 1040 +0.4% 1.00x
CaptureProp 3669 3699 +0.8% 0.99x
CharIndexing_ascii_unicodeScalars_Backwards 14556 14384 -1.2% 1.01x
CharIndexing_chinese_unicodeScalars_Backwards 11024 10887 -1.2% 1.01x
CharIndexing_japanese_unicodeScalars_Backwards 17420 17207 -1.2% 1.01x
CharIndexing_korean_unicodeScalars_Backwards 14116 13932 -1.3% 1.01x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2635 2614 -0.8% 1.01x
CharIndexing_punctuated_unicodeScalars_Backwards 3298 3269 -0.9% 1.01x
CharIndexing_russian_unicodeScalars_Backwards 12130 11986 -1.2% 1.01x
CharIndexing_tweet_unicodeScalars_Backwards 28428 28386 -0.1% 1.00x
CharIndexing_utf16_unicodeScalars 20528 20920 +1.9% 0.98x
CharIndexing_utf16_unicodeScalars_Backwards 21419 21356 -0.3% 1.00x
CharIteration_ascii_unicodeScalars 18471 19227 +4.1% 0.96x
CharIteration_chinese_unicodeScalars 13969 14553 +4.2% 0.96x
CharIteration_japanese_unicodeScalars 22085 23036 +4.3% 0.96x
CharIteration_korean_unicodeScalars 17902 18640 +4.1% 0.96x
CharIteration_punctuatedJapanese_unicodeScalars 3312 3431 +3.6% 0.97x
CharIteration_punctuated_unicodeScalars 4153 4312 +3.8% 0.96x
CharIteration_russian_unicodeScalars 15377 16013 +4.1% 0.96x
CharIteration_utf16_unicodeScalars 24873 25128 +1.0% 0.99x
CharacterLiteralsLarge 5297 5295 -0.0% 1.00x (?)
CharacterLiteralsSmall 195 197 +1.0% 0.99x
CharacterPropertiesFetch 4211 4280 +1.6% 0.98x (?)
CharacterPropertiesPrecomputed 1012 1015 +0.3% 1.00x (?)
CharacterPropertiesStashed 1329 1339 +0.8% 0.99x
CharacterPropertiesStashedMemo 1402 1411 +0.6% 0.99x (?)
ClassArrayGetter 13 13 +0.0% 1.00x
Combos 454 449 -1.1% 1.01x (?)
DataAccessBytes 1102 1103 +0.1% 1.00x (?)
DataAppendArray 5643 5598 -0.8% 1.01x
DataAppendBytes 5477 5225 -4.6% 1.05x
DataAppendDataLargeToLarge 62397 62234 -0.3% 1.00x (?)
DataAppendDataLargeToMedium 32715 33441 +2.2% 0.98x
DataAppendDataLargeToSmall 31646 31661 +0.0% 1.00x (?)
DataAppendDataMediumToLarge 34913 34789 -0.4% 1.00x (?)
DataAppendDataMediumToMedium 7368 7527 +2.2% 0.98x (?)
DataAppendDataMediumToSmall 6603 6426 -2.7% 1.03x (?)
DataAppendDataSmallToLarge 34585 34271 -0.9% 1.01x (?)
DataAppendDataSmallToMedium 6701 6626 -1.1% 1.01x (?)
DataAppendDataSmallToSmall 6304 6368 +1.0% 0.99x (?)
DataAppendSequence 18790 18571 -1.2% 1.01x (?)
DataCopyBytes 2345 2353 +0.3% 1.00x (?)
DataCount 34 33 -2.9% 1.03x
DataMutateBytes 3926 3937 +0.3% 1.00x (?)
DataReplaceLarge 38605 38902 +0.8% 0.99x (?)
DataReplaceLargeBuffer 54882 54721 -0.3% 1.00x (?)
DataReplaceSmall 8289 8440 +1.8% 0.98x (?)
DataReplaceSmallBuffer 10049 10046 -0.0% 1.00x (?)
DataReset 2898 2950 +1.8% 0.98x
DataSetCount 801 809 +1.0% 0.99x
DataSubscript 213 213 +0.0% 1.00x
DictOfArraysToArrayOfDicts 744 724 -2.7% 1.03x
Dictionary 612 613 +0.2% 1.00x (?)
Dictionary2 730 727 -0.4% 1.00x (?)
Dictionary2OfObjects 2016 2004 -0.6% 1.01x (?)
Dictionary3 227 227 +0.0% 1.00x
Dictionary3OfObjects 693 697 +0.6% 0.99x (?)
Dictionary4 307 306 -0.3% 1.00x
Dictionary4Legacy 658 655 -0.5% 1.00x
Dictionary4OfObjects 407 408 +0.2% 1.00x
Dictionary4OfObjectsLegacy 840 858 +2.1% 0.98x (?)
DictionaryCopy 99297 99860 +0.6% 0.99x (?)
DictionaryFilter 97021 97539 +0.5% 0.99x
DictionaryGroup 194 194 +0.0% 1.00x
DictionaryGroupOfObjects 1900 1905 +0.3% 1.00x (?)
DictionaryKeysContainsCocoa 35 34 -2.9% 1.03x
DictionaryKeysContainsNative 28 28 +0.0% 1.00x
DictionaryLiteral 1745 1736 -0.5% 1.01x (?)
DictionaryOfObjects 2251 2244 -0.3% 1.00x (?)
DictionaryRemove 3879 3843 -0.9% 1.01x
DictionaryRemoveOfObjects 23475 23449 -0.1% 1.00x (?)
DictionarySubscriptDefaultMutation 242 239 -1.2% 1.01x
DictionarySubscriptDefaultMutationArray 557 557 +0.0% 1.00x
DictionarySubscriptDefaultMutationArrayOfObjects 3596 3600 +0.1% 1.00x
DictionarySubscriptDefaultMutationOfObjects 1538 1530 -0.5% 1.01x (?)
DictionarySwap 942 942 +0.0% 1.00x
DictionarySwapAt 6370 6106 -4.1% 1.04x
DictionarySwapAtOfObjects 47055 46860 -0.4% 1.00x (?)
DictionarySwapOfObjects 7943 7935 -0.1% 1.00x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 75 76 +1.3% 0.99x
DropFirstAnyCollectionLazy 57078 55957 -2.0% 1.02x (?)
DropFirstAnySeqCRangeIter 18970 18916 -0.3% 1.00x (?)
DropFirstAnySeqCRangeIterLazy 18977 18927 -0.3% 1.00x (?)
DropFirstAnySeqCntRange 37 37 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 37 37 +0.0% 1.00x
DropFirstAnySequence 4527 4532 +0.1% 1.00x (?)
DropFirstAnySequenceLazy 4552 4512 -0.9% 1.01x
DropFirstArray 31 31 +0.0% 1.00x
DropFirstArrayLazy 31 31 +0.0% 1.00x
DropFirstCountableRange 31 31 +0.0% 1.00x
DropFirstCountableRangeLazy 31 31 +0.0% 1.00x
DropFirstSequence 2408 2406 -0.1% 1.00x (?)
DropFirstSequenceLazy 2490 2489 -0.0% 1.00x (?)
DropLastAnyCollection 28 28 +0.0% 1.00x
DropLastAnyCollectionLazy 18681 18567 -0.6% 1.01x (?)
DropLastAnySeqCRangeIter 3324 3313 -0.3% 1.00x (?)
DropLastAnySeqCRangeIterLazy 3307 3311 +0.1% 1.00x (?)
DropLastAnySeqCntRange 12 12 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 12 12 +0.0% 1.00x
DropLastAnySequence 4547 4581 +0.7% 0.99x (?)
DropLastAnySequenceLazy 4647 4677 +0.6% 0.99x (?)
DropLastCountableRange 10 10 +0.0% 1.00x
DropLastCountableRangeLazy 10 10 +0.0% 1.00x
DropLastSequence 564 590 +4.6% 0.96x
DropLastSequenceLazy 563 590 +4.8% 0.95x
DropWhileAnyCollection 96 97 +1.0% 0.99x
DropWhileAnyCollectionLazy 112 112 +0.0% 1.00x
DropWhileAnySeqCRangeIter 15038 15007 -0.2% 1.00x
DropWhileAnySeqCRangeIterLazy 116 112 -3.4% 1.04x
DropWhileAnySeqCntRange 47 45 -4.3% 1.04x
DropWhileAnySeqCntRangeLazy 112 112 +0.0% 1.00x
DropWhileAnySequence 4392 4396 +0.1% 1.00x (?)
DropWhileAnySequenceLazy 1666 1666 +0.0% 1.00x
DropWhileArrayLazy 79 79 +0.0% 1.00x
DropWhileCountableRange 32 32 +0.0% 1.00x
DropWhileCountableRangeLazy 94 94 +0.0% 1.00x
DropWhileSequence 1991 1995 +0.2% 1.00x (?)
DropWhileSequenceLazy 79 79 +0.0% 1.00x
EqualStringSubstring 50 50 +0.0% 1.00x
EqualSubstringString 58 58 +0.0% 1.00x
EqualSubstringSubstring 43 43 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 43 43 +0.0% 1.00x
ErrorHandling 1342 1327 -1.1% 1.01x
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FatCompactMap 183291 182832 -0.3% 1.00x
FilterEvenUsingReduce 1194 1174 -1.7% 1.02x (?)
FilterEvenUsingReduceInto 134 133 -0.7% 1.01x (?)
FloatingPointPrinting_Double_description_small 21349 21458 +0.5% 0.99x
FloatingPointPrinting_Double_description_uniform 20742 20777 +0.2% 1.00x (?)
FloatingPointPrinting_Double_interpolated 61043 59658 -2.3% 1.02x
FloatingPointPrinting_Float80_description_small 27895 27968 +0.3% 1.00x (?)
FloatingPointPrinting_Float80_description_uniform 27059 27096 +0.1% 1.00x
FloatingPointPrinting_Float80_interpolated 62823 62750 -0.1% 1.00x (?)
FloatingPointPrinting_Float_description_small 4764 4688 -1.6% 1.02x
FloatingPointPrinting_Float_description_uniform 4610 4586 -0.5% 1.01x
FloatingPointPrinting_Float_interpolated 37931 37445 -1.3% 1.01x (?)
FrequenciesUsingReduce 4573 4461 -2.4% 1.03x
FrequenciesUsingReduceInto 1389 1397 +0.6% 0.99x (?)
HashTest 921 926 +0.5% 0.99x (?)
Histogram 644 627 -2.6% 1.03x
Integrate 300 307 +2.3% 0.98x
IterateData 1741 1765 +1.4% 0.99x
Join 167 162 -3.0% 1.03x
LazilyFilteredArrayContains 32912 33610 +2.1% 0.98x
LazilyFilteredArrays 59848 59856 +0.0% 1.00x (?)
LazilyFilteredRange 3472 3472 +0.0% 1.00x
LessSubstringSubstring 43 43 +0.0% 1.00x
LessSubstringSubstringGenericComparable 43 43 +0.0% 1.00x
LinkedList 6783 6786 +0.0% 1.00x
LuhnAlgoEager 293 289 -1.4% 1.01x (?)
LuhnAlgoLazy 292 292 +0.0% 1.00x
MapReduceAnyCollectionShort 2035 2024 -0.5% 1.01x
MapReduceClass 2726 2710 -0.6% 1.01x
MapReduceClassShort 4126 4078 -1.2% 1.01x (?)
MapReduceLazyCollection 12 12 +0.0% 1.00x
MapReduceLazySequence 77 77 +0.0% 1.00x
MapReduceSequence 411 410 -0.2% 1.00x (?)
MapReduceShort 1799 1809 +0.6% 0.99x
MapReduceShortString 27 27 +0.0% 1.00x
MapReduceString 71 71 +0.0% 1.00x
Memset 195 195 +0.0% 1.00x
MonteCarloE 9310 9240 -0.8% 1.01x
MonteCarloPi 38457 38356 -0.3% 1.00x
NSDictionaryCastToSwift 6552 6611 +0.9% 0.99x (?)
NSError 156 155 -0.6% 1.01x (?)
NSStringConversion 642 647 +0.8% 0.99x
NibbleSort 3296 3319 +0.7% 0.99x
ObjectAllocation 119 120 +0.8% 0.99x (?)
ObjectiveCBridgeFromNSArrayAnyObject 23859 23505 -1.5% 1.02x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 42663 42122 -1.3% 1.01x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 40564 39626 -2.3% 1.02x (?)
ObjectiveCBridgeFromNSSetAnyObject 45062 45485 +0.9% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 5073 4841 -4.6% 1.05x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 62612 61145 -2.3% 1.02x (?)
ObjectiveCBridgeFromNSString 1121 1114 -0.6% 1.01x
ObjectiveCBridgeFromNSStringForced 2419 2426 +0.3% 1.00x (?)
ObjectiveCBridgeStubDataAppend 10069 10138 +0.7% 0.99x (?)
ObjectiveCBridgeStubDateMutation 359 359 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 941 950 +1.0% 0.99x (?)
ObjectiveCBridgeStubFromNSStringRef 147 153 +4.1% 0.96x
ObjectiveCBridgeStubNSDataAppend 2289 2401 +4.9% 0.95x (?)
ObjectiveCBridgeStubNSDateMutationRef 12138 12210 +0.6% 0.99x (?)
ObjectiveCBridgeStubToArrayOfNSString 35030 35536 +1.4% 0.99x (?)
ObjectiveCBridgeStubToNSDate 14356 13885 -3.3% 1.03x (?)
ObjectiveCBridgeStubToNSDateRef 3087 3073 -0.5% 1.00x (?)
ObjectiveCBridgeStubToNSString 2157 2141 -0.7% 1.01x (?)
ObjectiveCBridgeStubToNSStringRef 109 111 +1.8% 0.98x (?)
ObjectiveCBridgeStubURLAppendPath 259929 265590 +2.2% 0.98x (?)
ObjectiveCBridgeStubURLAppendPathRef 260709 258394 -0.9% 1.01x
ObjectiveCBridgeToNSArray 13518 13646 +0.9% 0.99x (?)
ObjectiveCBridgeToNSSet 15982 15963 -0.1% 1.00x (?)
ObjectiveCBridgeToNSString 450 449 -0.2% 1.00x (?)
ObserverClosure 1921 1926 +0.3% 1.00x (?)
ObserverForwarderStruct 1080 1079 -0.1% 1.00x (?)
ObserverPartiallyAppliedMethod 3361 3362 +0.0% 1.00x (?)
ObserverUnappliedMethod 2289 2288 -0.0% 1.00x (?)
OpenClose 236 239 +1.3% 0.99x
PartialApplyDynamicType 0 0 +0.0% 1.00x
Phonebook 4366 4347 -0.4% 1.00x
PolymorphicCalls 22 22 +0.0% 1.00x
PopFrontArray 1758 1759 +0.1% 1.00x (?)
PopFrontArrayGeneric 1775 1767 -0.5% 1.00x (?)
PopFrontUnsafePointer 8536 8749 +2.5% 0.98x (?)
PrefixAnyCollection 75 75 +0.0% 1.00x
PrefixAnyCollectionLazy 58176 55681 -4.3% 1.04x (?)
PrefixAnySeqCRangeIter 14816 14810 -0.0% 1.00x (?)
PrefixAnySeqCRangeIterLazy 14833 14815 -0.1% 1.00x (?)
PrefixAnySeqCntRange 25 25 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 25 25 +0.0% 1.00x
PrefixAnySequence 3903 3904 +0.0% 1.00x (?)
PrefixAnySequenceLazy 3894 3902 +0.2% 1.00x
PrefixArray 31 31 +0.0% 1.00x
PrefixArrayLazy 31 31 +0.0% 1.00x
PrefixCountableRange 31 31 +0.0% 1.00x
PrefixCountableRangeLazy 31 31 +0.0% 1.00x
PrefixSequence 1994 1987 -0.4% 1.00x (?)
PrefixSequenceLazy 2043 2119 +3.7% 0.96x (?)
PrefixWhileAnyCollection 139 139 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 81 81 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 8171 8173 +0.0% 1.00x (?)
PrefixWhileAnySeqCRangeIterLazy 65 65 +0.0% 1.00x
PrefixWhileAnySeqCntRange 53 53 +0.0% 1.00x
PrefixWhileAnySeqCntRangeLazy 81 81 +0.0% 1.00x
PrefixWhileAnySequence 9270 9228 -0.5% 1.00x (?)
PrefixWhileAnySequenceLazy 1250 1249 -0.1% 1.00x (?)
PrefixWhileArray 79 79 +0.0% 1.00x
PrefixWhileArrayLazy 63 63 +0.0% 1.00x
PrefixWhileCountableRange 32 33 +3.1% 0.97x
PrefixWhileCountableRangeLazy 31 31 +0.0% 1.00x
PrefixWhileSequence 326 325 -0.3% 1.00x (?)
PrefixWhileSequenceLazy 47 47 +0.0% 1.00x
Prims 816 812 -0.5% 1.00x (?)
PrimsSplit 811 815 +0.5% 1.00x (?)
QueueConcrete 1023 1023 +0.0% 1.00x
QueueGeneric 1024 1026 +0.2% 1.00x
RGBHistogram 2894 2891 -0.1% 1.00x (?)
RGBHistogramOfObjects 21411 21361 -0.2% 1.00x (?)
RandomDoubleDef 24910 24940 +0.1% 1.00x (?)
RandomDoubleLCG 4087 3905 -4.5% 1.05x
RandomIntegersDef 22891 22953 +0.3% 1.00x
RandomIntegersLCG 2097 2082 -0.7% 1.01x
RandomShuffleDef 740495 741957 +0.2% 1.00x (?)
RandomShuffleLCG 137220 133043 -3.0% 1.03x
RangeAssignment 317 302 -4.7% 1.05x
RangeReplaceableCollectionPlusDefault 912 908 -0.4% 1.00x (?)
RecursiveOwnedParameter 103 103 +0.0% 1.00x
RemoveWhereFilterInts 42 41 -2.4% 1.02x
RemoveWhereFilterString 207 208 +0.5% 1.00x (?)
RemoveWhereFilterStrings 393 392 -0.3% 1.00x
RemoveWhereMoveInts 13 13 +0.0% 1.00x
RemoveWhereMoveStrings 639 636 -0.5% 1.00x (?)
RemoveWhereQuadraticInts 1161 1158 -0.3% 1.00x
RemoveWhereQuadraticString 342 342 +0.0% 1.00x
RemoveWhereQuadraticStrings 2478 2479 +0.0% 1.00x (?)
RemoveWhereSwapInts 17 17 +0.0% 1.00x
RemoveWhereSwapStrings 772 770 -0.3% 1.00x
ReversedArray 51 51 +0.0% 1.00x
ReversedBidirectional 15011 15222 +1.4% 0.99x
ReversedDictionary 208 209 +0.5% 1.00x (?)
RomanNumbers 85586 83049 -3.0% 1.03x
SequenceAlgosAnySequence 10567 10532 -0.3% 1.00x
SequenceAlgosArray 1387 1387 +0.0% 1.00x
SequenceAlgosContiguousArray 1391 1389 -0.1% 1.00x
SequenceAlgosList 1215 1215 +0.0% 1.00x
SequenceAlgosRange 2312 2312 +0.0% 1.00x
SequenceAlgosUnfoldSequence 989 989 +0.0% 1.00x
SetExclusiveOr 4628 4589 -0.8% 1.01x (?)
SetExclusiveOr_OfObjects 10676 10728 +0.5% 1.00x
SetIntersect 630 629 -0.2% 1.00x (?)
SetIntersect_OfObjects 1587 1564 -1.4% 1.01x (?)
SetIsSubsetOf 318 318 +0.0% 1.00x
SetIsSubsetOf_OfObjects 403 403 +0.0% 1.00x
SetUnion 3902 3937 +0.9% 0.99x
SetUnion_OfObjects 9080 9165 +0.9% 0.99x
SevenBoom 795 789 -0.8% 1.01x
SortLargeExistentials 5587 5531 -1.0% 1.01x
SortLettersInPlace 957 960 +0.3% 1.00x (?)
SortSortedStrings 960 957 -0.3% 1.00x
SortStrings 1899 1853 -2.4% 1.02x
SortStringsUnicode 2288 2377 +3.9% 0.96x
StackPromo 22626 22607 -0.1% 1.00x (?)
StrComplexWalk 1601 1601 +0.0% 1.00x
StrToInt 2898 2905 +0.2% 1.00x
StringAdder 646 635 -1.7% 1.02x
StringBuilder 569 565 -0.7% 1.01x
StringBuilderLong 1171 1133 -3.2% 1.03x (?)
StringComparison_abnormal 693 693 +0.0% 1.00x
StringComparison_ascii 1192 1172 -1.7% 1.02x
StringComparison_emoji 740 737 -0.4% 1.00x
StringComparison_fastPrenormal 746 739 -0.9% 1.01x
StringComparison_latin1 590 575 -2.5% 1.03x
StringComparison_longSharedPrefix 846 845 -0.1% 1.00x (?)
StringComparison_nonBMPSlowestPrenormal 1449 1449 +0.0% 1.00x
StringComparison_slowerPrenormal 1573 1566 -0.4% 1.00x (?)
StringComparison_zalgo 112489 112266 -0.2% 1.00x (?)
StringEdits 154803 154496 -0.2% 1.00x (?)
StringEnumRawValueInitialization 854 857 +0.4% 1.00x
StringEqualPointerComparison 266 256 -3.8% 1.04x
StringFromLongWholeSubstring 19 19 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 19 19 +0.0% 1.00x
StringHasPrefixAscii 2081 2057 -1.2% 1.01x
StringHasPrefixUnicode 91663 91659 -0.0% 1.00x (?)
StringHasSuffixAscii 2209 2210 +0.0% 1.00x (?)
StringHasSuffixUnicode 90185 90588 +0.4% 1.00x (?)
StringInterpolation 8978 8742 -2.6% 1.03x (?)
StringInterpolationManySmallSegments 18749 18550 -1.1% 1.01x (?)
StringInterpolationSmall 6888 6840 -0.7% 1.01x (?)
StringMatch 12077 11914 -1.3% 1.01x
StringRemoveDupes 462 468 +1.3% 0.99x (?)
StringUTF16Builder 2376 2355 -0.9% 1.01x (?)
StringUTF16SubstringBuilder 6109 6003 -1.7% 1.02x (?)
StringWalk 1341 1286 -4.1% 1.04x
StringWithCString 38153 36486 -4.4% 1.05x
StringWordBuilder 2261 2262 +0.0% 1.00x (?)
StringWordBuilderReservingCapacity 1610 1614 +0.2% 1.00x (?)
SubstringComparable 24 24 +0.0% 1.00x
SubstringEqualString 702 706 +0.6% 0.99x (?)
SubstringEquatable 1266 1269 +0.2% 1.00x
SubstringFromLongString 9 9 +0.0% 1.00x
SubstringFromLongStringGeneric 67 67 +0.0% 1.00x
SuffixAnyCollection 28 28 +0.0% 1.00x
SuffixAnySeqCRangeIter 3492 3503 +0.3% 1.00x (?)
SuffixAnySeqCRangeIterLazy 3508 3502 -0.2% 1.00x (?)
SuffixAnySeqCntRange 18 18 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 18 18 +0.0% 1.00x
SuffixAnySequence 4580 4574 -0.1% 1.00x (?)
SuffixAnySequenceLazy 4628 4672 +1.0% 0.99x
SuffixCountableRange 10 10 +0.0% 1.00x
SuffixCountableRangeLazy 10 10 +0.0% 1.00x
SuffixSequence 3341 3299 -1.3% 1.01x
SuffixSequenceLazy 3344 3315 -0.9% 1.01x
SumUsingReduce 87 91 +4.6% 0.96x
SumUsingReduceInto 91 87 -4.4% 1.05x
SuperChars 13224 13219 -0.0% 1.00x (?)
TwoSum 1308 1324 +1.2% 0.99x (?)
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 286 273 -4.5% 1.05x
Walsh 388 381 -1.8% 1.02x
WordCountHistogramASCII 7203 6865 -4.7% 1.05x
WordCountHistogramUTF16 12949 12658 -2.2% 1.02x (?)
WordCountUniqueASCII 1958 1948 -0.5% 1.01x (?)
WordCountUniqueUTF16 6621 6875 +3.8% 0.96x (?)
WordSplitUTF16 8018 7883 -1.7% 1.02x (?)
XorLoop 344 344 +0.0% 1.00x

Unoptimized (Onone)

Regression (24)
TEST OLD NEW DELTA SPEEDUP
CharIteration_ascii_unicodeScalars 135278 174490 +29.0% 0.78x
CharIteration_japanese_unicodeScalars_Backwards 269355 313102 +16.2% 0.86x (?)
CharIteration_tweet_unicodeScalars_Backwards 443847 513434 +15.7% 0.86x (?)
CharIteration_chinese_unicodeScalars_Backwards 171212 198018 +15.7% 0.86x
CharIteration_korean_unicodeScalars_Backwards 217918 250940 +15.2% 0.87x (?)
CharIteration_russian_unicodeScalars_Backwards 187261 215156 +14.9% 0.87x (?)
Histogram 5630 6462 +14.8% 0.87x
CharIteration_punctuated_unicodeScalars_Backwards 49623 56697 +14.3% 0.88x (?)
CharIteration_utf16_unicodeScalars_Backwards 201614 230083 +14.1% 0.88x
FrequenciesUsingReduceInto 2853 3242 +13.6% 0.88x
ObjectiveCBridgeFromNSArrayAnyObjectToString 43575 49077 +12.6% 0.89x (?)
CharIteration_ascii_unicodeScalars_Backwards 232960 259529 +11.4% 0.90x (?)
PrefixAnySeqCRangeIterLazy 17114 18898 +10.4% 0.91x
CharacterPropertiesStashed 2063 2275 +10.3% 0.91x
MapReduceShortString 205 226 +10.2% 0.91x
TypeFlood 173 189 +9.2% 0.92x
StringComparison_abnormal 1203 1313 +9.1% 0.92x
CharIndexing_japanese_unicodeScalars 353312 385044 +9.0% 0.92x (?)
AngryPhonebook 5105 5527 +8.3% 0.92x (?)
DictionaryKeysContainsNative 53 57 +7.5% 0.93x (?)
DataReplaceMedium 9027 9662 +7.0% 0.93x (?)
CharIndexing_utf16_unicodeScalars 257221 274963 +6.9% 0.94x (?)
StringEdits 334192 354544 +6.1% 0.94x
ObjectiveCBridgeStubURLAppendPath 268223 284217 +6.0% 0.94x (?)
Improvement (25)
TEST OLD NEW DELTA SPEEDUP
RandomIntegersLCG 34966 19814 -43.3% 1.76x
RandomIntegersDef 54331 39713 -26.9% 1.37x
CharIndexing_ascii_unicodeScalars_Backwards 431622 331854 -23.1% 1.30x
ObjectiveCBridgeStubFromNSDate 7433 6313 -15.1% 1.18x
CharIndexing_russian_unicodeScalars_Backwards 312020 269067 -13.8% 1.16x
CharIndexing_utf16_unicodeScalars_Backwards 325911 281907 -13.5% 1.16x
CharIndexing_korean_unicodeScalars_Backwards 370985 326295 -12.0% 1.14x
CharIndexing_chinese_unicodeScalars_Backwards 281071 251199 -10.6% 1.12x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 63399 56681 -10.6% 1.12x (?)
CStringShortAscii 6213 5569 -10.4% 1.12x
CharIndexing_tweet_unicodeScalars_Backwards 743991 671858 -9.7% 1.11x (?)
CharIndexing_japanese_unicodeScalars_Backwards 445529 402716 -9.6% 1.11x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 81912 74070 -9.6% 1.11x (?)
FloatingPointPrinting_Float80_interpolated 120010 109038 -9.1% 1.10x (?)
DataAppendDataSmallToMedium 6184 5643 -8.7% 1.10x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 46595 42761 -8.2% 1.09x (?)
Dictionary4 1164 1072 -7.9% 1.09x
DataReplaceSmallBuffer 11047 10191 -7.7% 1.08x (?)
NSDictionaryCastToSwift 7948 7337 -7.7% 1.08x (?)
Dictionary3OfObjects 2099 1947 -7.2% 1.08x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 111965 104034 -7.1% 1.08x (?)
CharIndexing_korean_unicodeScalars 332980 309450 -7.1% 1.08x
RandomDoubleDef 86481 80607 -6.8% 1.07x
NSError 582 545 -6.4% 1.07x
DictionarySubscriptDefaultMutationOfObjects 4994 4711 -5.7% 1.06x (?)
No Changes (386)
TEST OLD NEW DELTA SPEEDUP
AnyHashableWithAClass 99492 99942 +0.5% 1.00x (?)
Array2D 572822 571573 -0.2% 1.00x (?)
ArrayAppend 4079 4080 +0.0% 1.00x (?)
ArrayAppendArrayOfInt 729 732 +0.4% 1.00x
ArrayAppendAscii 25910 25581 -1.3% 1.01x (?)
ArrayAppendAsciiSubstring 166068 166527 +0.3% 1.00x
ArrayAppendFromGeneric 736 737 +0.1% 1.00x (?)
ArrayAppendGenericStructs 1275 1276 +0.1% 1.00x (?)
ArrayAppendLatin1 59382 59808 +0.7% 0.99x
ArrayAppendLatin1Substring 289880 289142 -0.3% 1.00x (?)
ArrayAppendLazyMap 156328 156555 +0.1% 1.00x
ArrayAppendOptionals 1275 1275 +0.0% 1.00x
ArrayAppendRepeatCol 163832 163641 -0.1% 1.00x (?)
ArrayAppendReserved 3743 3745 +0.1% 1.00x (?)
ArrayAppendSequence 91849 92054 +0.2% 1.00x
ArrayAppendStrings 5660 5655 -0.1% 1.00x (?)
ArrayAppendToFromGeneric 732 733 +0.1% 1.00x (?)
ArrayAppendToGeneric 739 740 +0.1% 1.00x (?)
ArrayAppendUTF16 59524 59550 +0.0% 1.00x (?)
ArrayAppendUTF16Substring 291471 292377 +0.3% 1.00x (?)
ArrayInClass 5813 5807 -0.1% 1.00x (?)
ArrayLiteral 1700 1693 -0.4% 1.00x (?)
ArrayOfGenericPOD2 1063 1064 +0.1% 1.00x
ArrayOfGenericRef 9720 9704 -0.2% 1.00x (?)
ArrayOfPOD 759 759 +0.0% 1.00x
ArrayOfRef 8920 8875 -0.5% 1.01x
ArrayPlusEqualArrayOfInt 732 734 +0.3% 1.00x
ArrayPlusEqualFiveElementCollection 211438 214283 +1.3% 0.99x (?)
ArrayPlusEqualSingleElementCollection 208181 209059 +0.4% 1.00x (?)
ArrayPlusEqualThreeElements 8473 8387 -1.0% 1.01x (?)
ArraySubscript 95270 95769 +0.5% 0.99x (?)
ArrayValueProp 3299 3351 +1.6% 0.98x (?)
ArrayValueProp2 13739 13765 +0.2% 1.00x (?)
ArrayValueProp3 3803 3824 +0.6% 0.99x
ArrayValueProp4 3731 3828 +2.6% 0.97x (?)
BinaryFloatingPointPropertiesBinade 77 74 -3.9% 1.04x
BinaryFloatingPointPropertiesNextUp 115 118 +2.6% 0.97x
BinaryFloatingPointPropertiesUlp 115 114 -0.9% 1.01x
BitCount 7929 7931 +0.0% 1.00x (?)
ByteSwap 8695 8650 -0.5% 1.01x
COWTree 10733 10639 -0.9% 1.01x (?)
CSVParsing 2728593 2673668 -2.0% 1.02x
CSVParsingAlt 1286216 1286183 -0.0% 1.00x (?)
CSVParsingAltIndices 2135928 2098497 -1.8% 1.02x (?)
CStringLongAscii 4820 4828 +0.2% 1.00x (?)
CStringLongNonAscii 2214 2325 +5.0% 0.95x
Calculator 1937 1914 -1.2% 1.01x
CaptureProp 247124 248931 +0.7% 0.99x
ChainedFilterMap 211346 210742 -0.3% 1.00x (?)
CharIndexing_ascii_unicodeScalars 291675 290654 -0.4% 1.00x (?)
CharIndexing_chinese_unicodeScalars 217596 217143 -0.2% 1.00x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 51086 51219 +0.3% 1.00x (?)
CharIndexing_punctuated_unicodeScalars 64346 64780 +0.7% 0.99x (?)
CharIndexing_russian_unicodeScalars 239491 239187 -0.1% 1.00x (?)
CharIndexing_tweet_unicodeScalars 580459 567429 -2.2% 1.02x (?)
CharIteration_chinese_unicodeScalars 102579 101807 -0.8% 1.01x (?)
CharIteration_japanese_unicodeScalars 161550 161407 -0.1% 1.00x (?)
CharIteration_korean_unicodeScalars 130679 130962 +0.2% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars 23987 23982 -0.0% 1.00x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 44041 44936 +2.0% 0.98x (?)
CharIteration_punctuated_unicodeScalars 30216 30199 -0.1% 1.00x (?)
CharIteration_russian_unicodeScalars 112356 112632 +0.2% 1.00x (?)
CharIteration_tweet_unicodeScalars 265946 266656 +0.3% 1.00x (?)
CharIteration_utf16_unicodeScalars 114138 113798 -0.3% 1.00x
CharacterLiteralsLarge 5203 5216 +0.2% 1.00x (?)
CharacterLiteralsSmall 606 626 +3.3% 0.97x
CharacterPropertiesFetch 4959 4994 +0.7% 0.99x (?)
CharacterPropertiesPrecomputed 3260 3224 -1.1% 1.01x (?)
CharacterPropertiesStashedMemo 3976 4055 +2.0% 0.98x
Chars 32143 32153 +0.0% 1.00x (?)
ClassArrayGetter 889 886 -0.3% 1.00x
Combos 2232 2206 -1.2% 1.01x
DataAccessBytes 2199 2171 -1.3% 1.01x (?)
DataAppendArray 4853 5017 +3.4% 0.97x (?)
DataAppendBytes 4411 4426 +0.3% 1.00x (?)
DataAppendDataLargeToLarge 60783 60617 -0.3% 1.00x (?)
DataAppendDataLargeToMedium 31480 32146 +2.1% 0.98x (?)
DataAppendDataLargeToSmall 30644 30695 +0.2% 1.00x (?)
DataAppendDataMediumToLarge 34012 34109 +0.3% 1.00x (?)
DataAppendDataMediumToMedium 6004 6279 +4.6% 0.96x (?)
DataAppendDataMediumToSmall 5365 5437 +1.3% 0.99x (?)
DataAppendDataSmallToLarge 33018 33136 +0.4% 1.00x (?)
DataAppendDataSmallToSmall 5356 5594 +4.4% 0.96x (?)
DataAppendSequence 1729437 1716186 -0.8% 1.01x
DataCopyBytes 2243 2261 +0.8% 0.99x (?)
DataCount 200 200 +0.0% 1.00x
DataMutateBytes 4736 4930 +4.1% 0.96x (?)
DataReplaceLarge 36397 36727 +0.9% 0.99x
DataReplaceLargeBuffer 53929 55046 +2.1% 0.98x
DataReplaceMediumBuffer 14885 14219 -4.5% 1.05x (?)
DataReplaceSmall 6249 6209 -0.6% 1.01x (?)
DataReset 2627 2601 -1.0% 1.01x (?)
DataSetCount 506 505 -0.2% 1.00x (?)
DataSubscript 398 398 +0.0% 1.00x
DictOfArraysToArrayOfDicts 3098 3207 +3.5% 0.97x
Dictionary 2115 2116 +0.0% 1.00x (?)
Dictionary2 1317 1305 -0.9% 1.01x
Dictionary2OfObjects 3870 3984 +2.9% 0.97x (?)
Dictionary3 779 782 +0.4% 1.00x (?)
Dictionary4Legacy 1336 1329 -0.5% 1.01x (?)
Dictionary4OfObjects 1593 1670 +4.8% 0.95x (?)
Dictionary4OfObjectsLegacy 1893 1892 -0.1% 1.00x (?)
DictionaryBridge 1252 1218 -2.7% 1.03x
DictionaryCopy 275342 273913 -0.5% 1.01x
DictionaryFilter 285937 285295 -0.2% 1.00x
DictionaryGroup 4008 4002 -0.1% 1.00x (?)
DictionaryGroupOfObjects 6252 6238 -0.2% 1.00x (?)
DictionaryKeysContainsCocoa 55 55 +0.0% 1.00x
DictionaryLiteral 7986 7959 -0.3% 1.00x (?)
DictionaryOfObjects 5327 5347 +0.4% 1.00x (?)
DictionaryRemove 15645 15635 -0.1% 1.00x (?)
DictionaryRemoveOfObjects 47213 46712 -1.1% 1.01x (?)
DictionarySubscriptDefaultMutation 1778 1791 +0.7% 0.99x (?)
DictionarySubscriptDefaultMutationArray 2026 2020 -0.3% 1.00x (?)
DictionarySubscriptDefaultMutationArrayOfObjects 8459 8336 -1.5% 1.01x (?)
DictionarySwap 4519 4537 +0.4% 1.00x (?)
DictionarySwapAt 31754 31846 +0.3% 1.00x (?)
DictionarySwapAtOfObjects 102309 102964 +0.6% 0.99x (?)
DictionarySwapOfObjects 17226 17293 +0.4% 1.00x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 13720 13696 -0.2% 1.00x (?)
DropFirstAnyCollectionLazy 98587 94198 -4.5% 1.05x (?)
DropFirstAnySeqCRangeIter 21086 21096 +0.0% 1.00x (?)
DropFirstAnySeqCRangeIterLazy 21375 21326 -0.2% 1.00x (?)
DropFirstAnySeqCntRange 13723 13764 +0.3% 1.00x (?)
DropFirstAnySeqCntRangeLazy 13793 13800 +0.1% 1.00x (?)
DropFirstAnySequence 11518 11487 -0.3% 1.00x
DropFirstAnySequenceLazy 11570 11785 +1.9% 0.98x
DropFirstArray 3001 2993 -0.3% 1.00x
DropFirstArrayLazy 26566 26558 -0.0% 1.00x (?)
DropFirstCountableRange 277 277 +0.0% 1.00x
DropFirstCountableRangeLazy 30579 30446 -0.4% 1.00x
DropFirstSequence 11182 11094 -0.8% 1.01x
DropFirstSequenceLazy 11202 11181 -0.2% 1.00x (?)
DropLastAnyCollection 4595 4639 +1.0% 0.99x
DropLastAnyCollectionLazy 31714 32730 +3.2% 0.97x (?)
DropLastAnySeqCRangeIter 36765 36631 -0.4% 1.00x
DropLastAnySeqCRangeIterLazy 36572 36519 -0.1% 1.00x (?)
DropLastAnySeqCntRange 4585 4589 +0.1% 1.00x (?)
DropLastAnySeqCntRangeLazy 4603 4596 -0.2% 1.00x (?)
DropLastAnySequence 27455 27468 +0.0% 1.00x (?)
DropLastAnySequenceLazy 27829 27773 -0.2% 1.00x (?)
DropLastCountableRange 97 97 +0.0% 1.00x
DropLastCountableRangeLazy 10278 10188 -0.9% 1.01x
DropLastSequence 27535 27890 +1.3% 0.99x (?)
DropLastSequenceLazy 27667 27744 +0.3% 1.00x (?)
DropWhileAnyCollection 18178 17758 -2.3% 1.02x
DropWhileAnyCollectionLazy 20046 19980 -0.3% 1.00x (?)
DropWhileAnySeqCRangeIter 22299 22197 -0.5% 1.00x (?)
DropWhileAnySeqCRangeIterLazy 20097 20083 -0.1% 1.00x (?)
DropWhileAnySeqCntRange 17832 17784 -0.3% 1.00x (?)
DropWhileAnySeqCntRangeLazy 20104 20062 -0.2% 1.00x (?)
DropWhileAnySequence 12315 12219 -0.8% 1.01x (?)
DropWhileAnySequenceLazy 11122 11068 -0.5% 1.00x
DropWhileArrayLazy 12947 13005 +0.4% 1.00x (?)
DropWhileCountableRange 4307 4295 -0.3% 1.00x (?)
DropWhileCountableRangeLazy 19788 19750 -0.2% 1.00x (?)
DropWhileSequence 11949 11878 -0.6% 1.01x (?)
DropWhileSequenceLazy 10790 10787 -0.0% 1.00x (?)
EqualStringSubstring 63 64 +1.6% 0.98x
EqualSubstringString 64 64 +0.0% 1.00x
EqualSubstringSubstring 65 65 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 52 52 +0.0% 1.00x
ErrorHandling 5533 5592 +1.1% 0.99x (?)
ExclusivityGlobal 172 172 +0.0% 1.00x
ExclusivityIndependent 67 67 +0.0% 1.00x
FatCompactMap 263174 262544 -0.2% 1.00x (?)
FilterEvenUsingReduce 3275 3297 +0.7% 0.99x (?)
FilterEvenUsingReduceInto 1687 1679 -0.5% 1.00x (?)
FloatingPointPrinting_Double_description_small 22063 21863 -0.9% 1.01x
FloatingPointPrinting_Double_description_uniform 32616 32456 -0.5% 1.00x (?)
FloatingPointPrinting_Double_interpolated 98089 97520 -0.6% 1.01x (?)
FloatingPointPrinting_Float80_description_small 28584 28657 +0.3% 1.00x
FloatingPointPrinting_Float80_description_uniform 55692 55459 -0.4% 1.00x
FloatingPointPrinting_Float_description_small 6116 6056 -1.0% 1.01x
FloatingPointPrinting_Float_description_uniform 15430 15546 +0.8% 0.99x
FloatingPointPrinting_Float_interpolated 71443 69403 -2.9% 1.03x (?)
FrequenciesUsingReduce 10085 10168 +0.8% 0.99x (?)
Hanoi 18396 18552 +0.8% 0.99x (?)
HashTest 19282 19603 +1.7% 0.98x (?)
Integrate 411 411 +0.0% 1.00x
IterateData 4844 4873 +0.6% 0.99x
Join 695 694 -0.1% 1.00x
LazilyFilteredArrayContains 676615 678769 +0.3% 1.00x (?)
LazilyFilteredArrays 1292944 1300981 +0.6% 0.99x
LazilyFilteredRange 470998 473682 +0.6% 0.99x (?)
LessSubstringSubstring 65 65 +0.0% 1.00x
LessSubstringSubstringGenericComparable 52 52 +0.0% 1.00x
LinkedList 29041 29034 -0.0% 1.00x (?)
LuhnAlgoEager 5357 5458 +1.9% 0.98x
LuhnAlgoLazy 5400 5545 +2.7% 0.97x (?)
MapReduce 23055 23104 +0.2% 1.00x (?)
MapReduceAnyCollection 22940 22989 +0.2% 1.00x (?)
MapReduceAnyCollectionShort 32801 34398 +4.9% 0.95x
MapReduceClass 27659 27722 +0.2% 1.00x
MapReduceClassShort 36834 37653 +2.2% 0.98x
MapReduceLazyCollection 20300 20380 +0.4% 1.00x (?)
MapReduceLazyCollectionShort 29873 29957 +0.3% 1.00x (?)
MapReduceLazySequence 18124 18172 +0.3% 1.00x
MapReduceSequence 27665 27745 +0.3% 1.00x (?)
MapReduceShort 32536 33525 +3.0% 0.97x (?)
MapReduceString 1554 1572 +1.2% 0.99x
Memset 40199 40226 +0.1% 1.00x (?)
MonteCarloE 1010746 1009226 -0.2% 1.00x (?)
MonteCarloPi 4599237 4595030 -0.1% 1.00x (?)
NSStringConversion 690 689 -0.1% 1.00x
NibbleSort 448688 449291 +0.1% 1.00x (?)
NopDeinit 181579 181529 -0.0% 1.00x (?)
ObjectAllocation 1166 1139 -2.3% 1.02x
ObjectiveCBridgeFromNSArrayAnyObject 25965 25425 -2.1% 1.02x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 8428 8106 -3.8% 1.04x (?)
ObjectiveCBridgeFromNSSetAnyObject 52383 51186 -2.3% 1.02x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 5794 5851 +1.0% 0.99x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 65918 65032 -1.3% 1.01x (?)
ObjectiveCBridgeFromNSString 2689 2691 +0.1% 1.00x (?)
ObjectiveCBridgeFromNSStringForced 2534 2510 -0.9% 1.01x
ObjectiveCBridgeStubDataAppend 5618 5522 -1.7% 1.02x (?)
ObjectiveCBridgeStubDateMutation 642 642 +0.0% 1.00x
ObjectiveCBridgeStubFromArrayOfNSString 33438 32952 -1.5% 1.01x (?)
ObjectiveCBridgeStubFromNSString 984 983 -0.1% 1.00x (?)
ObjectiveCBridgeStubFromNSStringRef 173 173 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2744 2784 +1.5% 0.99x (?)
ObjectiveCBridgeStubNSDateMutationRef 14535 13940 -4.1% 1.04x (?)
ObjectiveCBridgeStubToArrayOfNSString 35128 35936 +2.3% 0.98x (?)
ObjectiveCBridgeStubToNSDate 14434 14413 -0.1% 1.00x (?)
ObjectiveCBridgeStubToNSDateRef 3102 3114 +0.4% 1.00x (?)
ObjectiveCBridgeStubToNSString 2173 2181 +0.4% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 135 135 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPathRef 283448 273472 -3.5% 1.04x (?)
ObjectiveCBridgeToNSArray 13522 13563 +0.3% 1.00x (?)
ObjectiveCBridgeToNSDictionary 25409 26052 +2.5% 0.98x (?)
ObjectiveCBridgeToNSSet 17343 16650 -4.0% 1.04x (?)
ObjectiveCBridgeToNSString 469 490 +4.5% 0.96x
ObserverClosure 5924 5939 +0.3% 1.00x (?)
ObserverForwarderStruct 3912 3913 +0.0% 1.00x (?)
ObserverPartiallyAppliedMethod 7224 7215 -0.1% 1.00x (?)
ObserverUnappliedMethod 7544 7569 +0.3% 1.00x (?)
OpenClose 793 789 -0.5% 1.01x
PartialApplyDynamicType 36904 36450 -1.2% 1.01x (?)
Phonebook 17401 17261 -0.8% 1.01x (?)
PointerArithmetics 102777 102857 +0.1% 1.00x (?)
PolymorphicCalls 2130 2140 +0.5% 1.00x (?)
PopFrontArray 4301 4286 -0.3% 1.00x
PopFrontArrayGeneric 4905 4920 +0.3% 1.00x
PopFrontUnsafePointer 10012 9986 -0.3% 1.00x (?)
PrefixAnyCollection 13770 13720 -0.4% 1.00x (?)
PrefixAnyCollectionLazy 97439 93727 -3.8% 1.04x (?)
PrefixAnySeqCRangeIter 16778 16747 -0.2% 1.00x (?)
PrefixAnySeqCntRange 13753 13808 +0.4% 1.00x (?)
PrefixAnySeqCntRangeLazy 13757 13730 -0.2% 1.00x (?)
PrefixAnySequence 9414 9433 +0.2% 1.00x (?)
PrefixAnySequenceLazy 9401 9413 +0.1% 1.00x (?)
PrefixArray 2995 3009 +0.5% 1.00x
PrefixArrayLazy 26753 26630 -0.5% 1.00x
PrefixCountableRange 278 278 +0.0% 1.00x
PrefixCountableRangeLazy 30695 30424 -0.9% 1.01x (?)
PrefixSequence 9104 9099 -0.1% 1.00x (?)
PrefixSequenceLazy 9123 9110 -0.1% 1.00x (?)
PrefixWhileAnyCollection 25825 25725 -0.4% 1.00x (?)
PrefixWhileAnyCollectionLazy 16635 16668 +0.2% 1.00x (?)
PrefixWhileAnySeqCRangeIter 31166 31316 +0.5% 1.00x (?)
PrefixWhileAnySeqCRangeIterLazy 16476 16490 +0.1% 1.00x (?)
PrefixWhileAnySeqCntRange 25694 25603 -0.4% 1.00x
PrefixWhileAnySeqCntRangeLazy 16549 16504 -0.3% 1.00x (?)
PrefixWhileAnySequence 24279 24141 -0.6% 1.01x (?)
PrefixWhileAnySequenceLazy 9842 9837 -0.1% 1.00x (?)
PrefixWhileArray 9369 9374 +0.1% 1.00x (?)
PrefixWhileArrayLazy 11077 11097 +0.2% 1.00x (?)
PrefixWhileCountableRange 12232 12196 -0.3% 1.00x
PrefixWhileCountableRangeLazy 16412 16429 +0.1% 1.00x (?)
PrefixWhileSequence 24099 25131 +4.3% 0.96x (?)
PrefixWhileSequenceLazy 9811 9799 -0.1% 1.00x (?)
Prims 8506 8659 +1.8% 0.98x
PrimsSplit 8591 8658 +0.8% 0.99x (?)
QueueConcrete 12833 12852 +0.1% 1.00x (?)
QueueGeneric 16677 16713 +0.2% 1.00x (?)
RC4 14291 14310 +0.1% 1.00x
RGBHistogram 22819 23664 +3.7% 0.96x
RGBHistogramOfObjects 71452 74776 +4.7% 0.96x
RandomDoubleLCG 53693 53763 +0.1% 1.00x (?)
RandomShuffleDef 2031038 2033220 +0.1% 1.00x (?)
RandomShuffleLCG 1413688 1409997 -0.3% 1.00x (?)
RangeAssignment 2404 2415 +0.5% 1.00x (?)
RangeIterationSigned 13187 13370 +1.4% 0.99x (?)
RangeReplaceableCollectionPlusDefault 10021 10003 -0.2% 1.00x (?)
RecursiveOwnedParameter 5193 5173 -0.4% 1.00x (?)
RemoveWhereFilterInts 1749 1756 +0.4% 1.00x
RemoveWhereFilterString 1198 1186 -1.0% 1.01x
RemoveWhereFilterStrings 2212 2216 +0.2% 1.00x (?)
RemoveWhereMoveInts 3059 3061 +0.1% 1.00x (?)
RemoveWhereMoveStrings 3521 3530 +0.3% 1.00x
RemoveWhereQuadraticInts 7576 7577 +0.0% 1.00x (?)
RemoveWhereQuadraticString 2354 2350 -0.2% 1.00x (?)
RemoveWhereQuadraticStrings 9073 9067 -0.1% 1.00x (?)
RemoveWhereSwapInts 5528 5523 -0.1% 1.00x (?)
RemoveWhereSwapStrings 6189 6159 -0.5% 1.00x (?)
ReversedArray 12155 12191 +0.3% 1.00x (?)
ReversedBidirectional 39308 39034 -0.7% 1.01x (?)
ReversedDictionary 21270 21430 +0.8% 0.99x
RomanNumbers 1293118 1291739 -0.1% 1.00x (?)
SequenceAlgosAnySequence 11574 11608 +0.3% 1.00x
SequenceAlgosArray 678274 677967 -0.0% 1.00x (?)
SequenceAlgosContiguousArray 254841 256965 +0.8% 0.99x
SequenceAlgosList 7781 7780 -0.0% 1.00x (?)
SequenceAlgosRange 1139549 1143341 +0.3% 1.00x
SequenceAlgosUnfoldSequence 5850 5819 -0.5% 1.01x
SetExclusiveOr 14650 14592 -0.4% 1.00x
SetExclusiveOr_OfObjects 36944 36968 +0.1% 1.00x (?)
SetIntersect 6033 6044 +0.2% 1.00x (?)
SetIntersect_OfObjects 9210 9200 -0.1% 1.00x (?)
SetIsSubsetOf 1071 1071 +0.0% 1.00x
SetIsSubsetOf_OfObjects 2040 2125 +4.2% 0.96x (?)
SetUnion 10680 10660 -0.2% 1.00x (?)
SetUnion_OfObjects 26652 27194 +2.0% 0.98x (?)
SevenBoom 978 970 -0.8% 1.01x (?)
Sim2DArray 39267 39157 -0.3% 1.00x (?)
SortLargeExistentials 10528 10500 -0.3% 1.00x
SortLettersInPlace 1745 1750 +0.3% 1.00x (?)
SortSortedStrings 1034 1050 +1.5% 0.98x
SortStrings 2027 2072 +2.2% 0.98x
SortStringsUnicode 2497 2443 -2.2% 1.02x
StackPromo 94351 91529 -3.0% 1.03x (?)
StaticArray 2319 2302 -0.7% 1.01x (?)
StrComplexWalk 6129 6132 +0.0% 1.00x (?)
StrToInt 71746 72729 +1.4% 0.99x (?)
StringAdder 1018 1012 -0.6% 1.01x
StringBuilder 4969 4970 +0.0% 1.00x (?)
StringBuilderLong 1278 1280 +0.2% 1.00x (?)
StringBuilderWithLongSubstring 3378 3314 -1.9% 1.02x (?)
StringComparison_ascii 8655 8630 -0.3% 1.00x
StringComparison_emoji 1791 1776 -0.8% 1.01x (?)
StringComparison_fastPrenormal 4498 4454 -1.0% 1.01x
StringComparison_latin1 3518 3483 -1.0% 1.01x
StringComparison_longSharedPrefix 2133 2117 -0.8% 1.01x
StringComparison_nonBMPSlowestPrenormal 3320 3295 -0.8% 1.01x
StringComparison_slowerPrenormal 3737 3706 -0.8% 1.01x
StringComparison_zalgo 114654 114489 -0.1% 1.00x (?)
StringEnumRawValueInitialization 30471 30220 -0.8% 1.01x (?)
StringEqualPointerComparison 1461 1461 +0.0% 1.00x
StringFromLongWholeSubstring 21 21 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 177 178 +0.6% 0.99x (?)
StringHasPrefixAscii 2827 2827 +0.0% 1.00x
StringHasPrefixUnicode 92634 94832 +2.4% 0.98x
StringHasSuffixAscii 2968 2970 +0.1% 1.00x (?)
StringHasSuffixUnicode 91873 92070 +0.2% 1.00x (?)
StringInterpolation 12115 12231 +1.0% 0.99x (?)
StringInterpolationManySmallSegments 19394 19419 +0.1% 1.00x (?)
StringInterpolationSmall 8451 8283 -2.0% 1.02x (?)
StringMatch 41982 41339 -1.5% 1.02x (?)
StringRemoveDupes 653 658 +0.8% 0.99x (?)
StringUTF16Builder 7166 7390 +3.1% 0.97x (?)
StringUTF16SubstringBuilder 20220 19587 -3.1% 1.03x (?)
StringWalk 11788 11785 -0.0% 1.00x (?)
StringWithCString 37053 37066 +0.0% 1.00x (?)
StringWordBuilder 2325 2321 -0.2% 1.00x (?)
StringWordBuilderReservingCapacity 1700 1721 +1.2% 0.99x
SubstringComparable 1467 1467 +0.0% 1.00x
SubstringEqualString 1532 1527 -0.3% 1.00x (?)
SubstringEquatable 4854 4841 -0.3% 1.00x (?)
SubstringFromLongString 16 16 +0.0% 1.00x
SubstringFromLongStringGeneric 96 96 +0.0% 1.00x
SuffixAnyCollection 4604 4600 -0.1% 1.00x (?)
SuffixAnyCollectionLazy 31970 31302 -2.1% 1.02x (?)
SuffixAnySeqCRangeIter 32766 32844 +0.2% 1.00x (?)
SuffixAnySeqCRangeIterLazy 32592 32724 +0.4% 1.00x
SuffixAnySeqCntRange 4592 4614 +0.5% 1.00x
SuffixAnySeqCntRangeLazy 4582 4609 +0.6% 0.99x
SuffixAnySequence 23638 23630 -0.0% 1.00x (?)
SuffixAnySequenceLazy 24154 23955 -0.8% 1.01x (?)
SuffixCountableRange 97 97 +0.0% 1.00x
SuffixCountableRangeLazy 10257 10196 -0.6% 1.01x (?)
SuffixSequence 23638 23487 -0.6% 1.01x
SuffixSequenceLazy 23892 23722 -0.7% 1.01x (?)
SumUsingReduce 143865 144019 +0.1% 1.00x (?)
SumUsingReduceInto 148468 148068 -0.3% 1.00x
SuperChars 75379 75251 -0.2% 1.00x (?)
TwoSum 3174 3154 -0.6% 1.01x
UTF8Decode 26769 26682 -0.3% 1.00x (?)
Walsh 10841 10838 -0.0% 1.00x (?)
WordCountHistogramASCII 36128 36128 +0.0% 1.00x
WordCountHistogramUTF16 42579 43178 +1.4% 0.99x
WordCountUniqueASCII 6903 6631 -3.9% 1.04x (?)
WordCountUniqueUTF16 11640 11566 -0.6% 1.01x (?)
WordSplitASCII 8911 8790 -1.4% 1.01x (?)
WordSplitUTF16 10926 10558 -3.4% 1.03x
XorLoop 22543 22525 -0.1% 1.00x (?)
Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 8-Core Intel Xeon E5
  Processor Speed: 3 GHz
  Number of Processors: 1
  Total Number of Cores: 8
  L2 Cache (per Core): 256 KB
  L3 Cache: 25 MB
  Memory: 64 GB

@airspeedswift airspeedswift merged commit f9f2fc3 into swiftlang:master May 12, 2018
@stephentyrone stephentyrone deleted the simplify-integer-random branch February 8, 2023 00:36
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.

5 participants