Skip to content

[stdlib] Modernize sort code #18824

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 7 commits into from
Aug 19, 2018

Conversation

airspeedswift
Copy link
Member

@airspeedswift airspeedswift commented Aug 18, 2018

When reviewing #18629 I realized this code was pretty horribly out of date, style-wise. Mostly this is making free functions that pass &self into mutating methods, with some minor other cleanups along the way.

Not expecting this to impact performance unless it interacts with the optimizer in some odd way.

@airspeedswift
Copy link
Member Author

@swift-ci please smoke benchmark

@airspeedswift
Copy link
Member Author

@swift-ci please test

@airspeedswift
Copy link
Member Author

@swift-ci please smoke test compiler performance

@airspeedswift
Copy link
Member Author

fyi @Overlazy

@swift-ci
Copy link
Contributor

Build comment file:

Summary for master smoketest

Unexpected test results, excluded stats for Kingfisher, ReactiveCocoa

No regressions above thresholds

Debug

debug brief

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (3)
name old new delta delta_pct
Frontend.NumInstructionsExecuted 162,634,858,644 162,938,705,249 303,846,605 0.19%
LLVM.NumLLVMBytesOutput 9,383,084 9,383,084 0 0.0%
time.swift-driver.wall 20.4s 20.2s -204.7ms -1.0%

debug detailed

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (23)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 5,982 5,982 0 0.0%
AST.NumLoadedModules 1,281 1,281 0 0.0%
AST.NumTotalClangImportedEntities 18,238 18,238 0 0.0%
AST.NumUsedConformances 1,344 1,344 0 0.0%
IRModule.NumIRBasicBlocks 30,973 30,973 0 0.0%
IRModule.NumIRFunctions 17,122 17,122 0 0.0%
IRModule.NumIRGlobals 14,036 14,036 0 0.0%
IRModule.NumIRInsts 437,707 437,707 0 0.0%
IRModule.NumIRValueSymbols 29,349 29,349 0 0.0%
LLVM.NumLLVMBytesOutput 9,383,084 9,383,084 0 0.0%
SILModule.NumSILGenFunctions 8,060 8,060 0 0.0%
SILModule.NumSILOptFunctions 11,016 11,016 0 0.0%
Sema.NumConformancesDeserialized 31,046 31,046 0 0.0%
Sema.NumConstraintScopes 75,123 75,123 0 0.0%
Sema.NumDeclsDeserialized 259,506 259,908 402 0.15%
Sema.NumDeclsValidated 18,551 18,551 0 0.0%
Sema.NumFunctionsTypechecked 5,036 5,036 0 0.0%
Sema.NumGenericSignatureBuilders 11,001 11,001 0 0.0%
Sema.NumLazyGenericEnvironments 49,865 50,012 147 0.29%
Sema.NumLazyGenericEnvironmentsLoaded 5,934 5,934 0 0.0%
Sema.NumLazyIterableDeclContexts 40,460 40,535 75 0.19%
Sema.NumTypesDeserialized 113,027 113,185 158 0.14%
Sema.NumTypesValidated 31,034 31,034 0 0.0%

Release

release brief

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (3)
name old new delta delta_pct
Frontend.NumInstructionsExecuted 217,289,470,679 217,334,093,598 44,622,919 0.02%
LLVM.NumLLVMBytesOutput 10,495,784 10,495,684 -100 -0.0%
time.swift-driver.wall 34.5s 34.6s 22.2ms 0.06%

release detailed

Regressed (0)
name old new delta delta_pct
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (23)
name old new delta delta_pct
AST.NumImportedExternalDefinitions 1,411 1,411 0 0.0%
AST.NumLoadedModules 100 100 0 0.0%
AST.NumTotalClangImportedEntities 4,911 4,911 0 0.0%
AST.NumUsedConformances 1,346 1,346 0 0.0%
IRModule.NumIRBasicBlocks 34,100 34,094 -6 -0.02%
IRModule.NumIRFunctions 15,290 15,290 0 0.0%
IRModule.NumIRGlobals 13,532 13,532 0 0.0%
IRModule.NumIRInsts 332,373 332,358 -15 -0.0%
IRModule.NumIRValueSymbols 27,315 27,315 0 0.0%
LLVM.NumLLVMBytesOutput 10,495,784 10,495,684 -100 -0.0%
SILModule.NumSILGenFunctions 6,207 6,207 0 0.0%
SILModule.NumSILOptFunctions 9,285 9,285 0 0.0%
Sema.NumConformancesDeserialized 16,402 16,276 -126 -0.77%
Sema.NumConstraintScopes 73,691 73,691 0 0.0%
Sema.NumDeclsDeserialized 53,613 53,691 78 0.15%
Sema.NumDeclsValidated 12,645 12,645 0 0.0%
Sema.NumFunctionsTypechecked 3,079 3,079 0 0.0%
Sema.NumGenericSignatureBuilders 2,586 2,586 0 0.0%
Sema.NumLazyGenericEnvironments 9,461 9,494 33 0.35%
Sema.NumLazyGenericEnvironmentsLoaded 1,344 1,344 0 0.0%
Sema.NumLazyIterableDeclContexts 5,818 5,827 9 0.15%
Sema.NumTypesDeserialized 30,732 30,564 -168 -0.55%
Sema.NumTypesValidated 17,088 17,088 0 0.0%

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (19)
TEST OLD NEW DELTA SPEEDUP
BinaryFloatingPointPropertiesBinade 25 31 +24.0% 0.81x
DictionaryBridgeToObjC_Access 923 1077 +16.7% 0.86x (?)
ObjectiveCBridgeToNSSet 16967 19274 +13.6% 0.88x
DataAppendDataLargeToLarge 69324 78290 +12.9% 0.89x
FatCompactMap 1248 1409 +12.9% 0.89x
ChainedFilterMap 1248 1407 +12.7% 0.89x
StaticArray 9 10 +11.1% 0.90x (?)
Calculator 198 218 +10.1% 0.91x
CharIteration_tweet_unicodeScalars_Backwards 28349 30953 +9.2% 0.92x
DataAppendArray 5514 6012 +9.0% 0.92x
DataCount 34 37 +8.8% 0.92x
ByteSwap 99 107 +8.1% 0.93x
MapReduce 369 398 +7.9% 0.93x
ObjectiveCBridgeStubFromArrayOfNSString2 3363 3624 +7.8% 0.93x (?)
CharIteration_utf16_unicodeScalars_Backwards 17267 18428 +6.7% 0.94x
NopDeinit 30169 32193 +6.7% 0.94x
DataAppendBytes 5139 5482 +6.7% 0.94x
PrefixWhileSequence 327 348 +6.4% 0.94x
BinaryFloatingPointPropertiesUlp 35 37 +5.7% 0.95x
Improvement (18)
TEST OLD NEW DELTA SPEEDUP
DictionaryKeysContainsCocoa 49 40 -18.4% 1.22x (?)
UTF8Decode_InitFromData 1431 1248 -12.8% 1.15x
MapReduceLazyCollectionShort 35 31 -11.4% 1.13x
ObjectiveCBridgeStubFromNSString 1169 1039 -11.1% 1.13x
OpenClose 73 65 -11.0% 1.12x
DataSetCount 603 546 -9.5% 1.10x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 51127 46830 -8.4% 1.09x
DictionaryBridge 1362 1260 -7.5% 1.08x
ObjectiveCBridgeFromNSArrayAnyObject 27679 25711 -7.1% 1.08x (?)
ObjectiveCBridgeFromNSDictionaryAnyObject 121570 113462 -6.7% 1.07x (?)
AngryPhonebook 3811 3563 -6.5% 1.07x
PrefixAnySeqCRangeIterLazy 33 31 -6.1% 1.06x
PrefixAnySeqCRangeIter 33 31 -6.1% 1.06x
DataReplaceMedium 8243 7744 -6.1% 1.06x
UTF8Decode_InitFromData_ascii 783 738 -5.7% 1.06x (?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 45816 43229 -5.6% 1.06x (?)
StringComparison_abnormal 824 778 -5.6% 1.06x
ObjectiveCBridgeStubNSDataAppend 2657 2517 -5.3% 1.06x
No Changes (410)
TEST OLD NEW DELTA SPEEDUP
AnyHashableWithAClass 91557 92138 +0.6% 0.99x (?)
Array2D 2720 2718 -0.1% 1.00x
ArrayAppend 795 798 +0.4% 1.00x (?)
ArrayAppendArrayOfInt 798 795 -0.4% 1.00x (?)
ArrayAppendAscii 3865 3922 +1.5% 0.99x
ArrayAppendAsciiSubstring 24796 24926 +0.5% 0.99x (?)
ArrayAppendFromGeneric 798 803 +0.6% 0.99x
ArrayAppendGenericStructs 1427 1427 +0.0% 1.00x
ArrayAppendLatin1 39554 40663 +2.8% 0.97x
ArrayAppendLatin1Substring 139024 140381 +1.0% 0.99x
ArrayAppendLazyMap 1339 1340 +0.1% 1.00x (?)
ArrayAppendOptionals 1423 1431 +0.6% 0.99x
ArrayAppendRepeatCol 1338 1337 -0.1% 1.00x (?)
ArrayAppendReserved 529 528 -0.2% 1.00x (?)
ArrayAppendSequence 1121 1119 -0.2% 1.00x (?)
ArrayAppendStrings 6331 6216 -1.8% 1.02x
ArrayAppendToFromGeneric 799 795 -0.5% 1.01x (?)
ArrayAppendToGeneric 799 802 +0.4% 1.00x
ArrayAppendUTF16 39651 40717 +2.7% 0.97x
ArrayAppendUTF16Substring 138272 138875 +0.4% 1.00x
ArrayInClass 85 86 +1.2% 0.99x
ArrayLiteral 0 0 +0.0% 1.00x
ArrayOfGenericPOD2 152 152 +0.0% 1.00x
ArrayOfGenericRef 4346 4342 -0.1% 1.00x (?)
ArrayOfPOD 186 186 +0.0% 1.00x
ArrayOfRef 4343 4326 -0.4% 1.00x (?)
ArrayPlusEqualArrayOfInt 801 798 -0.4% 1.00x (?)
ArrayPlusEqualFiveElementCollection 4210 4253 +1.0% 0.99x
ArrayPlusEqualSingleElementCollection 797 794 -0.4% 1.00x (?)
ArrayPlusEqualThreeElements 1638 1633 -0.3% 1.00x
ArraySubscript 1564 1559 -0.3% 1.00x (?)
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
BinaryFloatingPointPropertiesNextUp 28 28 +0.0% 1.00x
BitCount 169 169 +0.0% 1.00x
COWArrayGuaranteedParameterOverhead 11596 11648 +0.4% 1.00x (?)
COWTree 3770 3644 -3.3% 1.03x (?)
CSVParsing2 1746 1720 -1.5% 1.02x
CSVParsingAlt2 1771 1759 -0.7% 1.01x
CSVParsingAltIndices2 755 761 +0.8% 0.99x (?)
CStringLongAscii 3532 3530 -0.1% 1.00x (?)
CStringLongNonAscii 2119 2149 +1.4% 0.99x
CStringShortAscii 3184 3183 -0.0% 1.00x (?)
CaptureProp 4045 4067 +0.5% 0.99x (?)
CharIndexing_ascii_unicodeScalars 16767 16640 -0.8% 1.01x
CharIndexing_ascii_unicodeScalars_Backwards 16280 16349 +0.4% 1.00x
CharIndexing_chinese_unicodeScalars 12830 12608 -1.7% 1.02x
CharIndexing_chinese_unicodeScalars_Backwards 12321 12256 -0.5% 1.01x
CharIndexing_japanese_unicodeScalars 20135 19906 -1.1% 1.01x
CharIndexing_japanese_unicodeScalars_Backwards 19497 19414 -0.4% 1.00x (?)
CharIndexing_korean_unicodeScalars 16358 16136 -1.4% 1.01x
CharIndexing_korean_unicodeScalars_Backwards 15778 15738 -0.3% 1.00x
CharIndexing_punctuatedJapanese_unicodeScalars 3058 3025 -1.1% 1.01x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 2940 2959 +0.6% 0.99x
CharIndexing_punctuated_unicodeScalars 3825 3782 -1.1% 1.01x
CharIndexing_punctuated_unicodeScalars_Backwards 3679 3693 +0.4% 1.00x
CharIndexing_russian_unicodeScalars 13994 13849 -1.0% 1.01x
CharIndexing_russian_unicodeScalars_Backwards 13565 13629 +0.5% 1.00x
CharIndexing_tweet_unicodeScalars 32594 32754 +0.5% 1.00x (?)
CharIndexing_tweet_unicodeScalars_Backwards 31362 31620 +0.8% 0.99x
CharIndexing_utf16_unicodeScalars 22831 22790 -0.2% 1.00x
CharIndexing_utf16_unicodeScalars_Backwards 23031 22937 -0.4% 1.00x
CharIteration_ascii_unicodeScalars 20362 20898 +2.6% 0.97x
CharIteration_ascii_unicodeScalars_Backwards 14923 15476 +3.7% 0.96x
CharIteration_chinese_unicodeScalars 15426 15816 +2.5% 0.98x
CharIteration_chinese_unicodeScalars_Backwards 11309 11731 +3.7% 0.96x
CharIteration_japanese_unicodeScalars 24397 25027 +2.6% 0.97x
CharIteration_japanese_unicodeScalars_Backwards 17858 18536 +3.8% 0.96x
CharIteration_korean_unicodeScalars 19761 20258 +2.5% 0.98x
CharIteration_korean_unicodeScalars_Backwards 14485 15008 +3.6% 0.97x
CharIteration_punctuatedJapanese_unicodeScalars 3669 3730 +1.7% 0.98x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 2707 2800 +3.4% 0.97x
CharIteration_punctuated_unicodeScalars 4588 4686 +2.1% 0.98x
CharIteration_punctuated_unicodeScalars_Backwards 3385 3505 +3.5% 0.97x
CharIteration_russian_unicodeScalars 16970 17405 +2.6% 0.98x
CharIteration_russian_unicodeScalars_Backwards 12428 12906 +3.8% 0.96x
CharIteration_tweet_unicodeScalars 40514 41229 +1.8% 0.98x
CharIteration_utf16_unicodeScalars 27526 27530 +0.0% 1.00x
CharacterLiteralsLarge 5861 5858 -0.1% 1.00x (?)
CharacterLiteralsSmall 217 220 +1.4% 0.99x
CharacterPropertiesFetch 4529 4499 -0.7% 1.01x (?)
CharacterPropertiesPrecomputed 986 969 -1.7% 1.02x (?)
CharacterPropertiesStashed 1715 1715 +0.0% 1.00x
CharacterPropertiesStashedMemo 1448 1422 -1.8% 1.02x (?)
Chars2 2636 2623 -0.5% 1.00x
ClassArrayGetter2 125 125 +0.0% 1.00x
Combos 495 497 +0.4% 1.00x (?)
DataAccessBytes 1138 1147 +0.8% 0.99x
DataAppendDataLargeToMedium 35208 35336 +0.4% 1.00x (?)
DataAppendDataLargeToSmall 34758 34269 -1.4% 1.01x
DataAppendDataMediumToLarge 38002 38382 +1.0% 0.99x (?)
DataAppendDataMediumToMedium 6346 6677 +5.2% 0.95x (?)
DataAppendDataMediumToSmall 6016 5865 -2.5% 1.03x
DataAppendDataSmallToLarge 37522 37330 -0.5% 1.01x (?)
DataAppendDataSmallToMedium 6151 6467 +5.1% 0.95x
DataAppendDataSmallToSmall 5760 5826 +1.1% 0.99x (?)
DataAppendSequence 22210 21389 -3.7% 1.04x (?)
DataCopyBytes 533 532 -0.2% 1.00x
DataMutateBytes 3929 3909 -0.5% 1.01x (?)
DataReplaceLarge 37145 36720 -1.1% 1.01x (?)
DataReplaceLargeBuffer 59081 59152 +0.1% 1.00x (?)
DataReplaceMediumBuffer 12971 13187 +1.7% 0.98x (?)
DataReplaceSmall 5853 5781 -1.2% 1.01x (?)
DataReplaceSmallBuffer 10436 10022 -4.0% 1.04x (?)
DataReset 2889 2943 +1.9% 0.98x
DataSubscript 220 220 +0.0% 1.00x
DictOfArraysToArrayOfDicts 806 816 +1.2% 0.99x (?)
Dictionary 509 497 -2.4% 1.02x
Dictionary2 619 616 -0.5% 1.00x
Dictionary2OfObjects 2072 2069 -0.1% 1.00x (?)
Dictionary3 213 211 -0.9% 1.01x
Dictionary3OfObjects 727 725 -0.3% 1.00x
Dictionary4 300 302 +0.7% 0.99x (?)
Dictionary4Legacy 654 671 +2.6% 0.97x
Dictionary4OfObjects 421 420 -0.2% 1.00x (?)
Dictionary4OfObjectsLegacy 881 902 +2.4% 0.98x
DictionaryBridgeToObjC_Bridge 19 19 +0.0% 1.00x
DictionaryBridgeToObjC_BulkAccess 169 172 +1.8% 0.98x (?)
DictionaryCompactMapValuesOfCastValue 10958 10981 +0.2% 1.00x (?)
DictionaryCompactMapValuesOfNilValue 6526 6466 -0.9% 1.01x
DictionaryCopy 98678 98408 -0.3% 1.00x
DictionaryFilter 98668 98059 -0.6% 1.01x (?)
DictionaryGroup 200 200 +0.0% 1.00x
DictionaryGroupOfObjects 2090 2076 -0.7% 1.01x (?)
DictionaryKeysContainsNative 31 30 -3.2% 1.03x (?)
DictionaryLiteral 1854 1828 -1.4% 1.01x (?)
DictionaryOfObjects 2365 2360 -0.2% 1.00x (?)
DictionaryRemove 5266 5283 +0.3% 1.00x (?)
DictionaryRemoveOfObjects 25097 24915 -0.7% 1.01x (?)
DictionarySubscriptDefaultMutation 243 244 +0.4% 1.00x
DictionarySubscriptDefaultMutationArray 585 585 +0.0% 1.00x
DictionarySubscriptDefaultMutationArrayOfObjects 4024 4009 -0.4% 1.00x (?)
DictionarySubscriptDefaultMutationOfObjects 1693 1672 -1.2% 1.01x
DictionarySwap 949 940 -0.9% 1.01x
DictionarySwapAt 6184 6365 +2.9% 0.97x
DictionarySwapAtOfObjects 51871 51945 +0.1% 1.00x (?)
DictionarySwapOfObjects 8580 8667 +1.0% 0.99x (?)
DoubleWidthDivision 0 0 +0.0% 1.00x
DropFirstAnyCollection 76 76 +0.0% 1.00x
DropFirstAnyCollectionLazy 65639 65426 -0.3% 1.00x (?)
DropFirstAnySeqCRangeIter 93 93 +0.0% 1.00x
DropFirstAnySeqCRangeIterLazy 93 93 +0.0% 1.00x
DropFirstAnySeqCntRange 71 71 +0.0% 1.00x
DropFirstAnySeqCntRangeLazy 71 71 +0.0% 1.00x
DropFirstAnySequence 1843 1842 -0.1% 1.00x (?)
DropFirstAnySequenceLazy 1842 1842 +0.0% 1.00x
DropFirstArray 35 35 +0.0% 1.00x
DropFirstArrayLazy 35 35 +0.0% 1.00x
DropFirstCountableRange 29 29 +0.0% 1.00x
DropFirstCountableRangeLazy 29 29 +0.0% 1.00x
DropFirstSequence 2683 2680 -0.1% 1.00x (?)
DropFirstSequenceLazy 2774 2771 -0.1% 1.00x
DropLastAnyCollection 28 28 +0.0% 1.00x
DropLastAnyCollectionLazy 21837 21543 -1.3% 1.01x (?)
DropLastAnySeqCRangeIter 3289 3337 +1.5% 0.99x
DropLastAnySeqCRangeIterLazy 3290 3336 +1.4% 0.99x
DropLastAnySeqCntRange 9 9 +0.0% 1.00x
DropLastAnySeqCntRangeLazy 9 9 +0.0% 1.00x
DropLastAnySequence 5029 4937 -1.8% 1.02x
DropLastAnySequenceLazy 5123 5008 -2.2% 1.02x
DropLastSequence 638 661 +3.6% 0.97x
DropLastSequenceLazy 636 661 +3.9% 0.96x
DropWhileAnyCollection 100 100 +0.0% 1.00x
DropWhileAnyCollectionLazy 147 148 +0.7% 0.99x
DropWhileAnySeqCRangeIter 75 75 +0.0% 1.00x
DropWhileAnySeqCRangeIterLazy 147 147 +0.0% 1.00x
DropWhileAnySeqCntRange 95 95 +0.0% 1.00x
DropWhileAnySeqCntRangeLazy 147 147 +0.0% 1.00x
DropWhileAnySequence 1845 1855 +0.5% 0.99x
DropWhileAnySequenceLazy 1856 1855 -0.1% 1.00x (?)
DropWhileArrayLazy 105 105 +0.0% 1.00x
DropWhileCountableRange 30 30 +0.0% 1.00x
DropWhileCountableRangeLazy 82 82 +0.0% 1.00x
DropWhileSequence 2222 2208 -0.6% 1.01x
DropWhileSequenceLazy 105 105 +0.0% 1.00x
EqualStringSubstring 48 48 +0.0% 1.00x
EqualSubstringString 48 48 +0.0% 1.00x
EqualSubstringSubstring 48 48 +0.0% 1.00x
EqualSubstringSubstringGenericEquatable 48 48 +0.0% 1.00x
ErrorHandling 1193 1192 -0.1% 1.00x (?)
ExclusivityGlobal 5 5 +0.0% 1.00x
ExclusivityIndependent 2 2 +0.0% 1.00x
FilterEvenUsingReduce 1341 1335 -0.4% 1.00x (?)
FilterEvenUsingReduceInto 161 161 +0.0% 1.00x
FloatingPointPrinting_Double_description_small 21712 21594 -0.5% 1.01x (?)
FloatingPointPrinting_Double_description_uniform 21191 21161 -0.1% 1.00x (?)
FloatingPointPrinting_Double_interpolated 63253 61431 -2.9% 1.03x (?)
FloatingPointPrinting_Float80_description_small 28650 28697 +0.2% 1.00x (?)
FloatingPointPrinting_Float80_description_uniform 27485 27846 +1.3% 0.99x
FloatingPointPrinting_Float80_interpolated 65090 64809 -0.4% 1.00x (?)
FloatingPointPrinting_Float_description_small 5685 5795 +1.9% 0.98x
FloatingPointPrinting_Float_description_uniform 5756 5641 -2.0% 1.02x
FloatingPointPrinting_Float_interpolated 38659 39961 +3.4% 0.97x
FrequenciesUsingReduce 4722 4752 +0.6% 0.99x (?)
FrequenciesUsingReduceInto 1496 1507 +0.7% 0.99x (?)
Hanoi 2084 2148 +3.1% 0.97x
HashTest 945 938 -0.7% 1.01x (?)
Histogram 587 592 +0.9% 0.99x
Integrate 335 337 +0.6% 0.99x
IterateData 1456 1410 -3.2% 1.03x
Join 161 158 -1.9% 1.02x
LazilyFilteredArrayContains 35310 34663 -1.8% 1.02x
LazilyFilteredArrays2 4675 4562 -2.4% 1.02x
LazilyFilteredRange 3665 3758 +2.5% 0.98x
LessSubstringSubstring 48 48 +0.0% 1.00x
LessSubstringSubstringGenericComparable 48 48 +0.0% 1.00x
LinkedList 7557 7557 +0.0% 1.00x
LuhnAlgoEager 447 446 -0.2% 1.00x (?)
LuhnAlgoLazy 440 444 +0.9% 0.99x (?)
MapReduceAnyCollection 370 369 -0.3% 1.00x (?)
MapReduceAnyCollectionShort 2032 1989 -2.1% 1.02x
MapReduceClass 2982 2988 +0.2% 1.00x
MapReduceClassShort 4538 4532 -0.1% 1.00x (?)
MapReduceLazyCollection 13 13 +0.0% 1.00x
MapReduceLazySequence 86 86 +0.0% 1.00x
MapReduceSequence 473 469 -0.8% 1.01x
MapReduceShort 2006 1989 -0.8% 1.01x
MapReduceShortString 21 20 -4.8% 1.05x
MapReduceString 47 46 -2.1% 1.02x
Memset 214 219 +2.3% 0.98x (?)
MonteCarloE 10335 10294 -0.4% 1.00x
MonteCarloPi 42879 42765 -0.3% 1.00x
NSDictionaryCastToSwift 7401 7305 -1.3% 1.01x (?)
NSError 166 164 -1.2% 1.01x
NSStringConversion 690 675 -2.2% 1.02x
NibbleSort 3282 3298 +0.5% 1.00x
ObjectAllocation 132 132 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObjectForced 5226 5152 -1.4% 1.01x (?)
ObjectiveCBridgeFromNSSetAnyObject 52387 50537 -3.5% 1.04x (?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4090 4218 +3.1% 0.97x
ObjectiveCBridgeFromNSSetAnyObjectToString 80000 77988 -2.5% 1.03x (?)
ObjectiveCBridgeFromNSString 1229 1253 +2.0% 0.98x
ObjectiveCBridgeFromNSStringForced 2719 2724 +0.2% 1.00x (?)
ObjectiveCBridgeStubDataAppend 6403 6408 +0.1% 1.00x (?)
ObjectiveCBridgeStubDateMutation 400 401 +0.2% 1.00x
ObjectiveCBridgeStubToArrayOfNSString2 3898 3975 +2.0% 0.98x (?)
ObjectiveCBridgeStubToNSDate2 1625 1659 +2.1% 0.98x (?)
ObjectiveCBridgeStubToNSString 2347 2351 +0.2% 1.00x (?)
ObjectiveCBridgeStubToNSStringRef 124 124 +0.0% 1.00x
ObjectiveCBridgeStubURLAppendPath2 2819 2855 +1.3% 0.99x (?)
ObjectiveCBridgeStubURLAppendPathRef2 2874 2819 -1.9% 1.02x (?)
ObjectiveCBridgeToNSArray 14627 14786 +1.1% 0.99x (?)
ObjectiveCBridgeToNSDictionary 28009 28168 +0.6% 0.99x (?)
ObjectiveCBridgeToNSString 452 453 +0.2% 1.00x
ObserverClosure 2165 2157 -0.4% 1.00x (?)
ObserverForwarderStruct 1188 1191 +0.3% 1.00x (?)
ObserverPartiallyAppliedMethod 3742 3718 -0.6% 1.01x (?)
ObserverUnappliedMethod 2436 2459 +0.9% 0.99x
OpaqueConsumingUsers 4180 4179 -0.0% 1.00x (?)
Phonebook 6999 6964 -0.5% 1.01x
PointerArithmetics 31508 31503 -0.0% 1.00x (?)
PolymorphicCalls 25 25 +0.0% 1.00x
PopFrontArray 1789 1809 +1.1% 0.99x (?)
PopFrontArrayGeneric 1818 1827 +0.5% 1.00x (?)
PopFrontUnsafePointer 8729 8654 -0.9% 1.01x (?)
PrefixAnyCollection 76 76 +0.0% 1.00x
PrefixAnyCollectionLazy 65551 64658 -1.4% 1.01x (?)
PrefixAnySeqCntRange 71 71 +0.0% 1.00x
PrefixAnySeqCntRangeLazy 71 71 +0.0% 1.00x
PrefixAnySequence 1380 1378 -0.1% 1.00x
PrefixAnySequenceLazy 1378 1379 +0.1% 1.00x
PrefixArray 35 35 +0.0% 1.00x
PrefixArrayLazy 35 35 +0.0% 1.00x
PrefixCountableRange 29 29 +0.0% 1.00x
PrefixCountableRangeLazy 29 29 +0.0% 1.00x
PrefixSequence 2223 2210 -0.6% 1.01x
PrefixSequenceLazy 2276 2276 +0.0% 1.00x
PrefixWhileAnyCollection 147 147 +0.0% 1.00x
PrefixWhileAnyCollectionLazy 89 89 +0.0% 1.00x
PrefixWhileAnySeqCRangeIter 369 385 +4.3% 0.96x
PrefixWhileAnySeqCRangeIterLazy 89 89 +0.0% 1.00x
PrefixWhileAnySequence 1524 1514 -0.7% 1.01x
PrefixWhileAnySequenceLazy 1391 1391 +0.0% 1.00x
PrefixWhileArray 88 88 +0.0% 1.00x
PrefixWhileArrayLazy 70 70 +0.0% 1.00x
PrefixWhileSequenceLazy 52 52 +0.0% 1.00x
Prims 910 905 -0.5% 1.01x (?)
PrimsSplit 919 897 -2.4% 1.02x
QueueConcrete 1138 1138 +0.0% 1.00x
QueueGeneric 1129 1128 -0.1% 1.00x (?)
RC4 156 155 -0.6% 1.01x
RGBHistogram 2387 2424 +1.6% 0.98x
RGBHistogramOfObjects 20210 20045 -0.8% 1.01x
Radix2CooleyTukey 12533 12192 -2.7% 1.03x (?)
Radix2CooleyTukeyf 8718 8792 +0.8% 0.99x (?)
RandomDoubleDef 26793 26954 +0.6% 0.99x
RandomDoubleLCG 2204 2204 +0.0% 1.00x
RandomIntegersDef 24711 24328 -1.5% 1.02x
RandomIntegersLCG 178 178 +0.0% 1.00x
RandomShuffleDef2 2599 2587 -0.5% 1.00x
RandomShuffleLCG2 1782 1808 +1.5% 0.99x
RangeAssignment 336 335 -0.3% 1.00x (?)
RangeIterationSigned 171 171 +0.0% 1.00x
RangeReplaceableCollectionPlusDefault 1061 1050 -1.0% 1.01x (?)
RecursiveOwnedParameter 115 115 +0.0% 1.00x
RemoveWhereFilterInts 47 47 +0.0% 1.00x
RemoveWhereFilterString 241 242 +0.4% 1.00x (?)
RemoveWhereFilterStrings 436 436 +0.0% 1.00x
RemoveWhereMoveInts 14 14 +0.0% 1.00x
RemoveWhereMoveStrings 708 708 +0.0% 1.00x
RemoveWhereQuadraticInts 1283 1287 +0.3% 1.00x
RemoveWhereQuadraticString 373 372 -0.3% 1.00x (?)
RemoveWhereQuadraticStrings 2752 2750 -0.1% 1.00x (?)
RemoveWhereSwapInts 20 20 +0.0% 1.00x
RemoveWhereSwapStrings 865 863 -0.2% 1.00x (?)
ReversedArray2 200 200 +0.0% 1.00x
ReversedBidirectional 14003 14046 +0.3% 1.00x (?)
ReversedDictionary2 317 317 +0.0% 1.00x
RomanNumbers 88851 88042 -0.9% 1.01x
SequenceAlgosAnySequence 12305 12525 +1.8% 0.98x
SequenceAlgosArray 1570 1581 +0.7% 0.99x
SequenceAlgosContiguousArray 1580 1583 +0.2% 1.00x (?)
SequenceAlgosList 1349 1354 +0.4% 1.00x (?)
SequenceAlgosRange 2576 2577 +0.0% 1.00x (?)
SequenceAlgosUnfoldSequence 1105 1106 +0.1% 1.00x
SetExclusiveOr 4857 4769 -1.8% 1.02x
SetExclusiveOr_OfObjects 11211 11230 +0.2% 1.00x
SetIntersect 588 587 -0.2% 1.00x (?)
SetIntersect_OfObjects 1639 1625 -0.9% 1.01x (?)
SetIsSubsetOf 316 318 +0.6% 0.99x
SetIsSubsetOf_OfObjects 427 429 +0.5% 1.00x
SetUnion 4172 4118 -1.3% 1.01x
SetUnion_OfObjects 9625 9601 -0.2% 1.00x (?)
SevenBoom 847 840 -0.8% 1.01x (?)
Sim2DArray 400 401 +0.2% 1.00x
SortAdjacentIntPyramids 10165 10092 -0.7% 1.01x
SortIntPyramid 8760 8744 -0.2% 1.00x
SortLargeExistentials 5443 5453 +0.2% 1.00x (?)
SortLettersInPlace 941 941 +0.0% 1.00x
SortSortedStrings 691 679 -1.7% 1.02x
SortStrings 1460 1460 +0.0% 1.00x
SortStringsUnicode 2035 2057 +1.1% 0.99x
StackPromo 24735 24307 -1.7% 1.02x
StrComplexWalk 1786 1781 -0.3% 1.00x
StrToInt 3241 3188 -1.6% 1.02x
StringAdder 548 548 +0.0% 1.00x
StringBuilder 489 491 +0.4% 1.00x
StringBuilderLong 1308 1296 -0.9% 1.01x (?)
StringBuilderSmallReservingCapacity 501 500 -0.2% 1.00x
StringBuilderWithLongSubstring 1487 1550 +4.2% 0.96x (?)
StringComparison_ascii 971 991 +2.1% 0.98x
StringComparison_emoji 832 852 +2.4% 0.98x
StringComparison_fastPrenormal 817 846 +3.5% 0.97x
StringComparison_latin1 644 656 +1.9% 0.98x
StringComparison_longSharedPrefix 940 951 +1.2% 0.99x
StringComparison_nonBMPSlowestPrenormal 1659 1673 +0.8% 0.99x
StringComparison_slowerPrenormal 1799 1799 +0.0% 1.00x
StringComparison_zalgo 112123 111843 -0.2% 1.00x (?)
StringEdits 170349 169053 -0.8% 1.01x (?)
StringEnumRawValueInitialization 864 860 -0.5% 1.00x (?)
StringEqualPointerComparison 314 314 +0.0% 1.00x
StringFromLongWholeSubstring 21 21 +0.0% 1.00x
StringFromLongWholeSubstringGeneric 21 21 +0.0% 1.00x
StringHasPrefixAscii 2233 2261 +1.3% 0.99x
StringHasPrefixUnicode 99476 104540 +5.1% 0.95x
StringHasSuffixAscii 2291 2347 +2.4% 0.98x
StringHasSuffixUnicode 99084 101318 +2.3% 0.98x
StringHashing_abnormal 1373 1356 -1.2% 1.01x
StringHashing_ascii 35 34 -2.9% 1.03x
StringHashing_emoji 1950 1968 +0.9% 0.99x (?)
StringHashing_fastPrenormal 8407 8294 -1.3% 1.01x
StringHashing_latin1 2542 2534 -0.3% 1.00x (?)
StringHashing_longSharedPrefix 7586 7714 +1.7% 0.98x
StringHashing_nonBMPSlowestPrenormal 2163 2121 -1.9% 1.02x (?)
StringHashing_slowerPrenormal 2707 2716 +0.3% 1.00x (?)
StringHashing_zalgo 3496 3549 +1.5% 0.99x
StringInterpolation 8934 8904 -0.3% 1.00x (?)
StringInterpolationManySmallSegments 17686 17806 +0.7% 0.99x (?)
StringInterpolationSmall 3967 4036 +1.7% 0.98x
StringMatch 12435 12085 -2.8% 1.03x
StringRemoveDupes 466 478 +2.6% 0.97x
StringUTF16Builder 2544 2518 -1.0% 1.01x
StringUTF16SubstringBuilder 5771 5650 -2.1% 1.02x (?)
StringWalk 1552 1570 +1.2% 0.99x
StringWithCString2 1789 1785 -0.2% 1.00x
StringWordBuilder 2246 2288 +1.9% 0.98x
StringWordBuilderReservingCapacity 1612 1641 +1.8% 0.98x
SubstringComparable 12 12 +0.0% 1.00x
SubstringEqualString 602 610 +1.3% 0.99x
SubstringEquatable 1389 1419 +2.2% 0.98x (?)
SubstringFromLongString 10 10 +0.0% 1.00x
SubstringFromLongStringGeneric 74 74 +0.0% 1.00x
SuffixAnyCollection 28 28 +0.0% 1.00x
SuffixAnyCollectionLazy 21833 21813 -0.1% 1.00x (?)
SuffixAnySeqCRangeIter 3606 3631 +0.7% 0.99x (?)
SuffixAnySeqCRangeIterLazy 3606 3634 +0.8% 0.99x
SuffixAnySeqCntRange 14 14 +0.0% 1.00x
SuffixAnySeqCntRangeLazy 14 14 +0.0% 1.00x
SuffixAnySequence 4935 4948 +0.3% 1.00x (?)
SuffixAnySequenceLazy 5018 5075 +1.1% 0.99x
SuffixSequence 3650 3600 -1.4% 1.01x
SuffixSequenceLazy 3652 3606 -1.3% 1.01x (?)
SumUsingReduce 102 102 +0.0% 1.00x
SumUsingReduceInto 102 101 -1.0% 1.01x
SuperChars 19312 19375 +0.3% 1.00x
TwoSum 1378 1353 -1.8% 1.02x
TypeFlood 0 0 +0.0% 1.00x
UTF8Decode 301 300 -0.3% 1.00x
UTF8Decode_InitDecoding 1339 1349 +0.7% 0.99x (?)
UTF8Decode_InitDecoding_ascii 658 656 -0.3% 1.00x
UTF8Decode_InitFromBytes 1195 1187 -0.7% 1.01x (?)
UTF8Decode_InitFromBytes_ascii 484 502 +3.7% 0.96x (?)
Walsh 409 406 -0.7% 1.01x
WordCountHistogramASCII 6728 6795 +1.0% 0.99x
WordCountHistogramUTF16 10032 10055 +0.2% 1.00x (?)
WordCountUniqueASCII 2018 2024 +0.3% 1.00x (?)
WordCountUniqueUTF16 4557 4619 +1.4% 0.99x (?)
XorLoop 396 394 -0.5% 1.01x (?)
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 airspeedswift merged commit bd31014 into swiftlang:master Aug 19, 2018
@airspeedswift airspeedswift deleted the modernize-sort branch August 19, 2018 17: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.

2 participants