Skip to content

[PassManager] Update PassManager's function worklist for newly added SILFunctions #30710

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
Jun 3, 2020

Conversation

meg-gupta
Copy link
Contributor

@meg-gupta meg-gupta commented Mar 29, 2020

The PassManager should transform all functions in bottom up order.
This is necessary because when optimizations like inlining looks at the
callee function bodies to compute profitability, the callee functions
should have already undergone optimizations to get better profitability
estimates.

The PassManager builds its function worklist based on bottom up order
on initialization. However, newly created SILFunctions due to
specialization etc, are simply appended to the function worklist. This
can cause us to make bad inlining decisions due to inaccurate
profitability estimates. This change now updates the function worklist such
that, all the callees of the newly added SILFunction are proccessed
before it by the PassManager.

Fixes rdar://52202680

@meg-gupta
Copy link
Contributor Author

@swift-ci test compiler performance

@meg-gupta
Copy link
Contributor Author

@swift-ci please benchmark

@swift-ci
Copy link
Contributor

Performance: -O

Regression OLD NEW DELTA RATIO
StringFromLongWholeSubstringGeneric 12 21 +75.0% 0.57x
Breadcrumbs.MutatedIdxToUTF16.Mixed 283 454 +60.4% 0.62x
Breadcrumbs.MutatedUTF16ToIdx.Mixed 278 444 +59.7% 0.63x
Breadcrumbs.IdxToUTF16Range.longMixed 554 823 +48.6% 0.67x
Breadcrumbs.IdxToUTF16.longMixed 1006 1454 +44.5% 0.69x (?)
ArrayInitFromSlice 367 457 +24.5% 0.80x
ObjectiveCBridgeStubFromNSDateRef 4750 5780 +21.7% 0.82x (?)
DataCreateSmallArray 3050 3600 +18.0% 0.85x
ObjectiveCBridgeStringHash 130 152 +16.9% 0.86x
ObjectiveCBridgeStringGetASCIIContents 487 553 +13.6% 0.88x
SortStringsUnicode 2870 3235 +12.7% 0.89x
ObjectiveCBridgeStringIsEqual 286 322 +12.6% 0.89x
DataCountSmall 25 28 +12.0% 0.89x
ArrayPlusEqualThreeElements 1700 1890 +11.2% 0.90x (?)
ObjectiveCBridgeStringIsEqualAllSwift 73 81 +11.0% 0.90x (?)
ObjectiveCBridgeStringIsEqual2 295 326 +10.5% 0.90x (?)
COWArrayGuaranteedParameterOverhead 3500 3850 +10.0% 0.91x (?)
EqualSubstringSubstring 40 44 +10.0% 0.91x (?)
EqualSubstringSubstringGenericEquatable 40 44 +10.0% 0.91x
EqualSubstringString 40 44 +10.0% 0.91x (?)
EqualStringSubstring 41 45 +9.8% 0.91x
ObjectiveCBridgeStringCStringUsingEncoding 846 925 +9.3% 0.91x (?)
MapReduceLazyCollectionShort 34 37 +8.8% 0.92x (?)
ObjectiveCBridgeStringRangeOfString 1118 1210 +8.2% 0.92x (?)
ObjectiveCBridgeStringCompare2 1045 1127 +7.8% 0.93x
ObjectiveCBridgeStringCompare 1058 1141 +7.8% 0.93x (?)
MapReduce 371 400 +7.8% 0.93x (?)
StringComparison_latin1 628 676 +7.6% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
SortIntPyramid 1300 640 -50.8% 2.03x
SortAdjacentIntPyramids 1565 985 -37.1% 1.59x
FindString.Loop1.Substring 833 644 -22.7% 1.29x
FindString.Rec3.Substring 255 207 -18.8% 1.23x
UTF8Decode_InitDecoding 257 213 -17.1% 1.21x
UTF8Decode_InitFromBytes 252 221 -12.3% 1.14x
FindString.Rec3.String 216 190 -12.0% 1.14x
UTF8Decode_InitFromData 240 213 -11.2% 1.13x
StringHashing_fastPrenormal 980 870 -11.2% 1.13x
StringHashing_latin1 336 304 -9.5% 1.11x
StringWordBuilder 2400 2180 -9.2% 1.10x (?)
StringWordBuilderReservingCapacity 2350 2140 -8.9% 1.10x (?)
MapReduceAnyCollection 397 368 -7.3% 1.08x
LazilyFilteredArrayContains 40900 38100 -6.8% 1.07x (?)
StringHashing_nonBMPSlowestPrenormal 1650 1540 -6.7% 1.07x (?)

Code size: -O

Regression OLD NEW DELTA RATIO
ReduceInto.o 10932 14012 +28.2% 0.78x
ArraySetElement.o 1240 1334 +7.6% 0.93x
COWArrayGuaranteedParameterOverhead.o 1315 1409 +7.1% 0.93x
Sim2DArray.o 1320 1414 +7.1% 0.93x
RomanNumbers.o 6340 6764 +6.7% 0.94x
DiffingMyers.o 6485 6845 +5.6% 0.95x
MapReduce.o 27767 29235 +5.3% 0.95x
ArraySubscript.o 2858 3007 +5.2% 0.95x
Array2D.o 2984 3134 +5.0% 0.95x
Join.o 1615 1689 +4.6% 0.96x
Memset.o 2215 2309 +4.2% 0.96x
BinaryFloatingPointProperties.o 5676 5914 +4.2% 0.96x
XorLoop.o 2132 2221 +4.2% 0.96x
CSVParsing.o 53588 55796 +4.1% 0.96x
StackPromo.o 2217 2305 +4.0% 0.96x
FlattenList.o 4346 4506 +3.7% 0.96x
ArrayOfGenericRef.o 8966 9286 +3.6% 0.97x
DictTest4Legacy.o 16988 17580 +3.5% 0.97x
SortArrayInClass.o 2738 2832 +3.4% 0.97x
ArrayOfRef.o 9379 9699 +3.4% 0.97x
PopFrontGeneric.o 2744 2832 +3.2% 0.97x
DictTest4.o 16322 16834 +3.1% 0.97x
StringRemoveDupes.o 5573 5745 +3.1% 0.97x
ObserverForwarderStruct.o 2852 2940 +3.1% 0.97x
Phonebook.o 9159 9431 +3.0% 0.97x
Prims.o 12907 13283 +2.9% 0.97x
ObserverClosure.o 2478 2550 +2.9% 0.97x
PrimsSplit.o 12959 13335 +2.9% 0.97x
ObserverPartiallyAppliedMethod.o 2525 2597 +2.9% 0.97x
Combos.o 5070 5214 +2.8% 0.97x
ClassArrayGetter.o 3819 3923 +2.7% 0.97x
Hanoi.o 3120 3204 +2.7% 0.97x
SortLettersInPlace.o 8501 8728 +2.7% 0.97x
NopDeinit.o 4007 4111 +2.6% 0.97x
DictOfArraysToArrayOfDicts.o 22528 23112 +2.6% 0.97x
DictionaryCompactMapValues.o 13341 13677 +2.5% 0.98x
DictionarySubscriptDefault.o 19859 20355 +2.5% 0.98x
Histogram.o 3302 3382 +2.4% 0.98x
PopFront.o 3923 4011 +2.2% 0.98x
StringEdits.o 10982 11223 +2.2% 0.98x
DictionaryCopy.o 9510 9718 +2.2% 0.98x
ArrayInClass.o 4527 4621 +2.1% 0.98x
RangeOverlaps.o 6136 6262 +2.1% 0.98x
TwoSum.o 4448 4528 +1.8% 0.98x
DictTest2.o 11021 11213 +1.7% 0.98x
ObserverUnappliedMethod.o 5089 5177 +1.7% 0.98x
LazyFilter.o 8477 8621 +1.7% 0.98x
PrimsNonStrongRef.o 121032 122968 +1.6% 0.98x
Hash.o 23114 23482 +1.6% 0.98x
RangeReplaceableCollectionPlusDefault.o 5564 5652 +1.6% 0.98x
DictTest3.o 16021 16261 +1.5% 0.99x
StringWalk.o 40321 40913 +1.5% 0.99x
FindStringNaive.o 9587 9723 +1.4% 0.99x
Walsh.o 6364 6452 +1.4% 0.99x
NibbleSort.o 13304 13480 +1.3% 0.99x
DictTest.o 14572 14764 +1.3% 0.99x
DictionaryKeysContains.o 9002 9114 +1.2% 0.99x
DictionaryRemove.o 13296 13456 +1.2% 0.99x
DictionaryGroup.o 12691 12835 +1.1% 0.99x
DictionaryOfAnyHashableStrings.o 9279 9383 +1.1% 0.99x
IntegerParsing.o 58093 58741 +1.1% 0.99x
RGBHistogram.o 21542 21765 +1.0% 0.99x
CString.o 7015 7087 +1.0% 0.99x
 
Improvement OLD NEW DELTA RATIO
RandomShuffle.o 3632 3566 -1.8% 1.02x
ChainedFilterMap.o 3637 3581 -1.5% 1.02x
RC4.o 3975 3919 -1.4% 1.01x

Performance: -Osize

Regression OLD NEW DELTA RATIO
StringFromLongWholeSubstringGeneric 12 21 +75.0% 0.57x
Breadcrumbs.MutatedIdxToUTF16.Mixed 282 453 +60.6% 0.62x
Breadcrumbs.MutatedUTF16ToIdx.Mixed 278 444 +59.7% 0.63x
Breadcrumbs.IdxToUTF16Range.longMixed 552 822 +48.9% 0.67x
Breadcrumbs.IdxToUTF16.longMixed 1009 1460 +44.7% 0.69x (?)
ArrayInitFromSlice 368 456 +23.9% 0.81x
FlattenListLoop 4369 5189 +18.8% 0.84x (?)
ObjectiveCBridgeStringHash 129 152 +17.8% 0.85x
DataCreateSmallArray 3200 3750 +17.2% 0.85x
ObjectiveCBridgeStringGetASCIIContents 487 551 +13.1% 0.88x
ObjectiveCBridgeStubDateAccess 228 257 +12.7% 0.89x
ObjectiveCBridgeStringIsEqual 288 324 +12.5% 0.89x
SortStringsUnicode 2930 3280 +11.9% 0.89x
ObjectiveCBridgeStringIsEqual2 296 329 +11.1% 0.90x
DropFirstAnyCollection 164 182 +11.0% 0.90x
PrefixWhileAnyCollectionLazy 159 176 +10.7% 0.90x (?)
PrefixWhileAnySeqCRangeIterLazy 159 176 +10.7% 0.90x (?)
PrefixWhileAnySeqCntRangeLazy 159 176 +10.7% 0.90x
ObjectiveCBridgeStringIsEqualAllSwift 76 84 +10.5% 0.90x
DropWhileAnySeqCntRange 163 180 +10.4% 0.91x (?)
SuffixAnyCollection 59 65 +10.2% 0.91x
EqualSubstringString 40 44 +10.0% 0.91x
DropWhileAnyCollection 182 200 +9.9% 0.91x
EqualSubstringSubstring 41 45 +9.8% 0.91x (?)
LessSubstringSubstring 41 45 +9.8% 0.91x
EqualStringSubstring 41 45 +9.8% 0.91x (?)
EqualSubstringSubstringGenericEquatable 41 45 +9.8% 0.91x
LessSubstringSubstringGenericComparable 41 45 +9.8% 0.91x
ObjectiveCBridgeStringCStringUsingEncoding 848 930 +9.7% 0.91x
NopDeinit 15800 17300 +9.5% 0.91x (?)
SuffixArrayLazy 11 12 +9.1% 0.92x
DropFirstAnySeqCRangeIterLazy 213 232 +8.9% 0.92x (?)
ObjectiveCBridgeStringRangeOfString 1118 1214 +8.6% 0.92x
COWArrayGuaranteedParameterOverhead 3650 3950 +8.2% 0.92x (?)
ArrayPlusEqualThreeElements 1860 2010 +8.1% 0.93x (?)
ObjectiveCBridgeStringCompare2 1045 1127 +7.8% 0.93x (?)
ObjectiveCBridgeStringCompare 1064 1147 +7.8% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
FindString.Loop1.Substring 846 654 -22.7% 1.29x
FindString.Rec3.Substring 259 211 -18.5% 1.23x
UTF8Decode_InitDecoding 256 215 -16.0% 1.19x
UTF8Decode_InitFromBytes 252 220 -12.7% 1.15x
FindString.Rec3.String 216 191 -11.6% 1.13x
UTF8Decode_InitFromData 239 212 -11.3% 1.13x (?)
StringHashing_fastPrenormal 980 870 -11.2% 1.13x
DataCountMedium 28 25 -10.7% 1.12x (?)
CharacterLiteralsLarge 111 100 -9.9% 1.11x
PrefixAnyCollection 182 164 -9.9% 1.11x
PrefixAnySeqCRangeIterLazy 176 159 -9.7% 1.11x
PrefixAnySeqCntRangeLazy 176 159 -9.7% 1.11x (?)
StringHashing_latin1 336 304 -9.5% 1.11x
DropWhileAnySeqCRangeIter 180 163 -9.4% 1.10x
StringWordBuilderReservingCapacity 2360 2140 -9.3% 1.10x (?)
RomanNumbers2 696 632 -9.2% 1.10x (?)
StringWordBuilder 2400 2180 -9.2% 1.10x (?)
StringMatch 8900 8100 -9.0% 1.10x (?)
SuffixCountableRange 12 11 -8.3% 1.09x (?)
SuffixCountableRangeLazy 12 11 -8.3% 1.09x (?)
ReversedDictionary2 342 315 -7.9% 1.09x (?)
StringHashing_nonBMPSlowestPrenormal 1650 1540 -6.7% 1.07x
CharacterLiteralsSmall 345 322 -6.7% 1.07x

Code size: -Osize

Regression OLD NEW DELTA RATIO
Array2D.o 2724 2957 +8.6% 0.92x
DiffingMyers.o 6677 7213 +8.0% 0.93x
CSVParsing.o 49844 53772 +7.9% 0.93x
ArraySetElement.o 1286 1381 +7.4% 0.93x
Sim2DArray.o 1350 1445 +7.0% 0.93x
COWArrayGuaranteedParameterOverhead.o 1393 1488 +6.8% 0.94x
ArraySubscript.o 2832 2990 +5.6% 0.95x
Join.o 1655 1736 +4.9% 0.95x
XorLoop.o 2042 2140 +4.8% 0.95x
Memset.o 1989 2084 +4.8% 0.95x
StackPromo.o 2193 2297 +4.7% 0.95x
BinaryFloatingPointProperties.o 5371 5609 +4.4% 0.96x
ArrayOfGenericRef.o 9230 9582 +3.8% 0.96x
PopFrontGeneric.o 2768 2872 +3.8% 0.96x
FlattenList.o 3930 4074 +3.7% 0.96x
ArrayOfRef.o 9587 9923 +3.5% 0.97x
Combos.o 5390 5566 +3.3% 0.97x
Prims.o 12171 12563 +3.2% 0.97x
ObserverClosure.o 2858 2950 +3.2% 0.97x
PrimsSplit.o 12223 12615 +3.2% 0.97x
ObserverPartiallyAppliedMethod.o 2905 2997 +3.2% 0.97x
DictOfArraysToArrayOfDicts.o 21392 22056 +3.1% 0.97x
ObserverForwarderStruct.o 2992 3083 +3.0% 0.97x
PopFront.o 3561 3659 +2.8% 0.97x
RomanNumbers.o 6846 7033 +2.7% 0.97x
ClassArrayGetter.o 3818 3922 +2.7% 0.97x
DictTest4.o 14040 14408 +2.6% 0.97x
RangeOverlaps.o 5854 6005 +2.6% 0.97x
SortLettersInPlace.o 8260 8468 +2.5% 0.98x
StringEdits.o 10633 10890 +2.4% 0.98x
Walsh.o 4322 4426 +2.4% 0.98x
DictTest4Legacy.o 14914 15266 +2.4% 0.98x
NopDeinit.o 4583 4687 +2.3% 0.98x
StringRemoveDupes.o 3895 3983 +2.3% 0.98x
RangeReplaceableCollectionPlusDefault.o 4850 4954 +2.1% 0.98x
LazyFilter.o 8107 8275 +2.1% 0.98x
DictionaryCompactMapValues.o 12811 13067 +2.0% 0.98x
DictionarySubscriptDefault.o 17083 17419 +2.0% 0.98x
ArrayInClass.o 4836 4931 +2.0% 0.98x
DictionaryCopy.o 8242 8402 +1.9% 0.98x
MapReduce.o 22325 22757 +1.9% 0.98x
ObserverUnappliedMethod.o 5409 5513 +1.9% 0.98x
Hanoi.o 3303 3365 +1.9% 0.98x
StringMatch.o 5138 5234 +1.9% 0.98x
PrimsNonStrongRef.o 102516 104388 +1.8% 0.98x
Phonebook.o 9254 9420 +1.8% 0.98x
Hash.o 20531 20846 +1.5% 0.98x
DictionaryGroup.o 11131 11291 +1.4% 0.99x
ReversedCollections.o 8793 8913 +1.4% 0.99x
CString.o 6687 6775 +1.3% 0.99x
DictionaryKeysContains.o 8994 9106 +1.2% 0.99x
DictionaryOfAnyHashableStrings.o 8456 8560 +1.2% 0.99x
IntegerParsing.o 54939 55603 +1.2% 0.99x
RGBHistogram.o 20048 20288 +1.2% 0.99x
SortLargeExistentials.o 20446 20654 +1.0% 0.99x
 
Improvement OLD NEW DELTA RATIO
SortArrayInClass.o 2958 2840 -4.0% 1.04x
RandomShuffle.o 3878 3749 -3.3% 1.03x
ChainedFilterMap.o 3597 3509 -2.4% 1.03x
RandomTree.o 12103 11951 -1.3% 1.01x
RC4.o 3461 3421 -1.2% 1.01x
Diffing.o 8611 8515 -1.1% 1.01x

Performance: -Onone

Regression OLD NEW DELTA RATIO
Breadcrumbs.MutatedIdxToUTF16.Mixed 311 483 +55.3% 0.64x
Breadcrumbs.MutatedUTF16ToIdx.Mixed 308 472 +53.2% 0.65x
StringFromLongWholeSubstringGeneric 19 28 +47.4% 0.68x
Breadcrumbs.IdxToUTF16Range.longMixed 880 1144 +30.0% 0.77x (?)
ArrayInitFromSlice 427 523 +22.5% 0.82x
ObjectiveCBridgeStringHash 129 152 +17.8% 0.85x
Breadcrumbs.IdxToUTF16.longMixed 2534 2963 +16.9% 0.86x (?)
Set.isSuperset.Seq.Int50 2995 3464 +15.7% 0.86x
Set.isSuperset.Seq.Int25 1515 1750 +15.5% 0.87x
Set.isSuperset.Seq.Int0 1822 2102 +15.4% 0.87x (?)
Set.isSuperset.Seq.Int100 5997 6918 +15.4% 0.87x
Set.isDisjoint.Seq.Int100 1942 2233 +15.0% 0.87x (?)
ObjectiveCBridgeStringGetASCIIContents 487 554 +13.8% 0.88x
ObjectiveCBridgeStringIsEqual 287 323 +12.5% 0.89x
ObjectiveCBridgeStringIsEqual2 295 329 +11.5% 0.90x
ObjectiveCBridgeStringIsEqualAllSwift 76 84 +10.5% 0.90x (?)
EqualSubstringString 48 53 +10.4% 0.91x
ObjectiveCBridgeStringCStringUsingEncoding 845 929 +9.9% 0.91x
SortStringsUnicode 4375 4765 +8.9% 0.92x
EqualSubstringSubstring 47 51 +8.5% 0.92x
EqualSubstringSubstringGenericEquatable 47 51 +8.5% 0.92x
LessSubstringSubstringGenericComparable 47 51 +8.5% 0.92x
ObjectiveCBridgeStringRangeOfString 1118 1212 +8.4% 0.92x (?)
LessSubstringSubstring 48 52 +8.3% 0.92x
ObjectiveCBridgeStringCompare2 1044 1127 +8.0% 0.93x (?)
CharIndexing_korean_unicodeScalars_Backwards 610280 656320 +7.5% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
UTF8Decode_InitDecoding 293 245 -16.4% 1.20x (?)
UTF8Decode_InitFromBytes 255 222 -12.9% 1.15x
UTF8Decode_InitFromData 242 215 -11.2% 1.13x (?)
StringHashing_fastPrenormal 1470 1340 -8.8% 1.10x (?)
ArrayOfPOD 1112 1030 -7.4% 1.08x (?)

Code size: -swiftlibs

Regression OLD NEW DELTA RATIO
libswiftSwiftReflectionTest.dylib 24576 28672 +16.7% 0.86x
 
Improvement OLD NEW DELTA RATIO
libswiftCore.dylib 4042752 3788800 -6.3% 1.07x
How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

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

@swift-ci
Copy link
Contributor

Summary for master full

Unexpected test results, excluded stats for RxCocoa, SwifterSwift, Base64CoderSwiftUI

Regressions found (see below)

Debug-batch

debug-batch 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 69,980,888,665,800 70,403,790,572,518 422,901,906,718 0.6%
LLVM.NumLLVMBytesOutput 1,869,805,760 1,869,003,214 -802,546 -0.04%
time.swift-driver.wall 6374.7s 6381.7s 7.0s 0.11%

debug-batch detailed

Regressed (14)
name old new delta delta_pct
AST.NumASTBytesAllocated 62,485,340,869 63,538,822,763 1,053,481,894 1.69% ⛔
Driver.NumDriverPipePolls 69,028 71,233 2,205 3.19% ⛔
Driver.NumDriverPipeReads 56,165 58,394 2,229 3.97% ⛔
Sema.AccessLevelRequest 12,312,601 12,720,322 407,721 3.31% ⛔
Sema.CollectOverriddenDeclsRequest 7,569,824 7,863,584 293,760 3.88% ⛔
Sema.GenericParamListRequest 9,745,933 9,993,760 247,827 2.54% ⛔
Sema.InterfaceTypeRequest 14,634,773 14,872,787 238,014 1.63% ⛔
Sema.IsFinalRequest 2,778,645 2,812,824 34,179 1.23% ⛔
Sema.NumConformancesDeserialized 9,988,182 10,137,071 148,889 1.49% ⛔
Sema.NumDeclsDeserialized 80,723,072 81,830,944 1,107,872 1.37% ⛔
Sema.OverriddenDeclsRequest 2,610,800 2,643,186 32,386 1.24% ⛔
Sema.ProvideDefaultImplForRequest 7,569,824 7,863,584 293,760 3.88% ⛔
Sema.SPIGroupsRequest 15,295,265 15,629,889 334,624 2.19% ⛔
Sema.USRGenerationRequest 9,079,504 9,374,905 295,401 3.25% ⛔
Improved (0)
name old new delta delta_pct
Unchanged (delta < 1.0% or delta < 100.0ms) (218)
name old new delta delta_pct
AST.ImportSetCacheHit 2,216,597 2,217,721 1,124 0.05%
AST.ImportSetCacheMiss 1,011,009 1,011,140 131 0.01%
AST.ImportSetFoldHit 534,367 534,404 37 0.01%
AST.ImportSetFoldMiss 476,642 476,736 94 0.02%
AST.ModuleShadowCacheHit 3,677 3,677 0 0.0%
AST.ModuleShadowCacheMiss 1,964 1,964 0 0.0%
AST.ModuleVisibilityCacheHit 35,033 35,033 0 0.0%
AST.ModuleVisibilityCacheMiss 9,087 9,087 0 0.0%
AST.NumASTScopeLookups 4,433,471 4,435,914 2,443 0.06%
AST.NumBraceStmtASTScopeExpansions 646,083 646,083 0 0.0%
AST.NumBraceStmtASTScopes 646,083 646,083 0 0.0%
AST.NumDecls 144,947 144,947 0 0.0%
AST.NumDependencies 443,892 443,944 52 0.01%
AST.NumIterableTypeBodyASTScopeExpansions 285,744 285,776 32 0.01%
AST.NumIterableTypeBodyASTScopes 367,971 368,177 206 0.06%
AST.NumLinkLibraries 0 0 0 0.0%
AST.NumLoadedModules 421,060 421,060 0 0.0%
AST.NumLocalTypeDecls 255 255 0 0.0%
AST.NumModuleLookupClassMember 6,993 6,993 0 0.0%
AST.NumModuleLookupValue 55,849,924 55,886,473 36,549 0.07%
AST.NumObjCMethods 25,242 25,242 0 0.0%
AST.NumOperators 589 589 0 0.0%
AST.NumPrecedenceGroups 93 93 0 0.0%
AST.NumReferencedDynamicNames 191 191 0 0.0%
AST.NumReferencedMemberNames 6,678,564 6,678,564 0 0.0%
AST.NumReferencedTopLevelNames 571,926 571,926 0 0.0%
AST.NumSourceBuffers 599,511 599,511 0 0.0%
AST.NumSourceLines 4,828,874 4,828,874 0 0.0%
AST.NumSourceLinesPerSecond 2,674,069 2,669,988 -4,081 -0.15%
AST.NumTotalClangImportedEntities 2,220,141 2,241,213 21,072 0.95%
Driver.ChildrenMaxRSS 274,967,214,080 274,156,150,784 -811,063,296 -0.29%
Driver.DriverDepCascadingDynamic 0 0 0 0.0%
Driver.DriverDepCascadingExternal 0 0 0 0.0%
Driver.DriverDepCascadingMember 0 0 0 0.0%
Driver.DriverDepCascadingNominal 0 0 0 0.0%
Driver.DriverDepCascadingTopLevel 0 0 0 0.0%
Driver.DriverDepDynamic 0 0 0 0.0%
Driver.DriverDepExternal 0 0 0 0.0%
Driver.DriverDepMember 0 0 0 0.0%
Driver.DriverDepNominal 0 0 0 0.0%
Driver.DriverDepTopLevel 0 0 0 0.0%
Driver.NumDriverJobsRun 28,809 28,809 0 0.0%
Driver.NumDriverJobsSkipped 0 0 0 0.0%
Driver.NumProcessFailures 0 0 0 0.0%
Frontend.MaxMallocUsage 1,617,191,571,224 1,623,931,464,224 6,739,893,000 0.42%
Frontend.NumInstructionsExecuted 69,980,888,665,800 70,403,790,572,518 422,901,906,718 0.6%
Frontend.NumProcessFailures 0 0 0 0.0%
IRGen.IRGenSourceFileRequest 27,506 27,506 0 0.0%
IRGen.IRGenWholeModuleRequest 20 20 0 0.0%
IRModule.NumGOTEntries 249,106 249,102 -4 -0.0%
IRModule.NumIRAliases 201,631 201,631 0 0.0%
IRModule.NumIRBasicBlocks 8,194,698 8,190,438 -4,260 -0.05%
IRModule.NumIRComdatSymbols 0 0 0 0.0%
IRModule.NumIRFunctions 3,425,656 3,425,803 147 0.0%
IRModule.NumIRGlobals 3,832,834 3,832,801 -33 -0.0%
IRModule.NumIRIFuncs 0 0 0 0.0%
IRModule.NumIRInsts 94,144,928 94,054,584 -90,344 -0.1%
IRModule.NumIRNamedMetaData 139,130 139,130 0 0.0%
IRModule.NumIRValueSymbols 6,585,356 6,585,470 114 0.0%
LLVM.NumLLVMBytesOutput 1,869,805,760 1,869,003,214 -802,546 -0.04%
Parse.CodeCompletionSecondPassRequest 0 0 0 0.0%
Parse.NumFunctionsParsed 275,938 275,938 0 0.0%
Parse.NumIterableDeclContextParsed 958,473 958,554 81 0.01%
Parse.ParseAbstractFunctionBodyRequest 252,248 252,248 0 0.0%
Parse.ParseMembersRequest 789,161 789,242 81 0.01%
Parse.ParseSourceFileRequest 588,913 588,913 0 0.0%
SILGen.SILGenSourceFileRequest 27,506 27,506 0 0.0%
SILGen.SILGenWholeModuleRequest 1,292 1,292 0 0.0%
SILModule.NumSILGenDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILGenFunctions 1,755,745 1,755,745 0 0.0%
SILModule.NumSILGenGlobalVariables 54,955 54,955 0 0.0%
SILModule.NumSILGenVtables 19,063 19,063 0 0.0%
SILModule.NumSILGenWitnessTables 75,017 75,017 0 0.0%
SILModule.NumSILOptDefaultWitnessTables 0 0 0 0.0%
SILModule.NumSILOptFunctions 2,589,081 2,589,188 107 0.0%
SILModule.NumSILOptGlobalVariables 56,642 56,642 0 0.0%
SILModule.NumSILOptVtables 32,288 32,288 0 0.0%
SILModule.NumSILOptWitnessTables 173,885 173,885 0 0.0%
SILOptimizer.ExecuteSILPipelineRequest 111,381 111,381 0 0.0%
Sema.AbstractGenericSignatureRequest 37,181 37,176 -5 -0.01%
Sema.AnyObjectLookupRequest 283 283 0 0.0%
Sema.AreAllStoredPropertiesDefaultInitableRequest 23,983 23,983 0 0.0%
Sema.AttachedFunctionBuilderRequest 1 1 0 0.0%
Sema.AttachedPropertyWrapperTypeRequest 582,003 582,003 0 0.0%
Sema.AttachedPropertyWrappersRequest 2,505,088 2,505,107 19 0.0%
Sema.CallerSideDefaultArgExprRequest 79,248 79,248 0 0.0%
Sema.CheckRedeclarationRequest 1,005,735 1,005,735 0 0.0%
Sema.ClassAncestryFlagsRequest 118,315 118,315 0 0.0%
Sema.ClosureHasExplicitResultRequest 92,774 92,774 0 0.0%
Sema.CompareDeclSpecializationRequest 485,427 487,869 2,442 0.5%
Sema.CursorInfoRequest 0 0 0 0.0%
Sema.CustomAttrNominalRequest 1 1 0 0.0%
Sema.DefaultAndMaxAccessLevelRequest 60,352 60,355 3 0.0%
Sema.DefaultArgumentExprRequest 39,602 39,602 0 0.0%
Sema.DefaultArgumentInitContextRequest 461 461 0 0.0%
Sema.DefaultDefinitionTypeRequest 8,662 8,662 0 0.0%
Sema.DefaultTypeRequest 494,936 494,936 0 0.0%
Sema.DifferentiableAttributeTypeCheckRequest 0 0 0 0.0%
Sema.DirectLookupRequest 34,687,087 34,850,052 162,965 0.47%
Sema.DirectOperatorLookupRequest 584,953 584,998 45 0.01%
Sema.DirectPrecedenceGroupLookupRequest 145,981 145,981 0 0.0%
Sema.DynamicallyReplacedDeclRequest 1,097,854 1,097,854 0 0.0%
Sema.EmittedMembersRequest 28,878 28,878 0 0.0%
Sema.EnumRawTypeRequest 26,813 26,813 0 0.0%
Sema.EnumRawValuesRequest 10,857 10,857 0 0.0%
Sema.ExistentialConformsToSelfRequest 13,363 13,448 85 0.64%
Sema.ExistentialTypeSupportedRequest 18,421 18,421 0 0.0%
Sema.ExpandASTScopeRequest 8,032,421 8,032,866 445 0.01%
Sema.ExtendedNominalRequest 919,124 919,124 0 0.0%
Sema.ExtendedTypeRequest 86,936 86,946 10 0.01%
Sema.FunctionBuilderTypeRequest 1 1 0 0.0%
Sema.FunctionOperatorRequest 74,241 74,241 0 0.0%
Sema.GenericSignatureRequest 2,785,600 2,792,050 6,450 0.23%
Sema.GetDestructorRequest 29,363 29,363 0 0.0%
Sema.HasCircularInheritanceRequest 24,467 24,467 0 0.0%
Sema.HasCircularInheritedProtocolsRequest 10,624 10,624 0 0.0%
Sema.HasCircularRawValueRequest 9,196 9,196 0 0.0%
Sema.HasDefaultInitRequest 58,911 58,911 0 0.0%
Sema.HasDynamicCallableAttributeRequest 0 0 0 0.0%
Sema.HasDynamicMemberLookupAttributeRequest 677,731 678,697 966 0.14%
Sema.HasMemberwiseInitRequest 21,051 21,051 0 0.0%
Sema.HasMissingDesignatedInitializersRequest 27,394 27,394 0 0.0%
Sema.HasUserDefinedDesignatedInitRequest 58,922 58,922 0 0.0%
Sema.InferredGenericSignatureRequest 192,350 192,381 31 0.02%
Sema.InheritedDeclsReferencedRequest 6,135,959 6,192,442 56,483 0.92%
Sema.InheritedProtocolsRequest 689,637 690,772 1,135 0.16%
Sema.InheritedTypeRequest 323,846 323,913 67 0.02%
Sema.InheritsSuperclassInitializersRequest 30,118 30,118 0 0.0%
Sema.InitKindRequest 101,641 101,641 0 0.0%
Sema.IsABICompatibleOverrideRequest 139,575 139,575 0 0.0%
Sema.IsAccessorTransparentRequest 327,540 327,540 0 0.0%
Sema.IsCallableNominalTypeRequest 2,169 2,169 0 0.0%
Sema.IsDeclApplicableRequest 0 0 0 0.0%
Sema.IsDynamicRequest 1,802,418 1,802,418 0 0.0%
Sema.IsGetterMutatingRequest 449,276 449,276 0 0.0%
Sema.IsImplicitlyUnwrappedOptionalRequest 2,533,327 2,534,565 1,238 0.05%
Sema.IsObjCRequest 1,632,206 1,635,623 3,417 0.21%
Sema.IsSetterMutatingRequest 353,555 353,555 0 0.0%
Sema.IsStaticRequest 972,813 973,675 862 0.09%
Sema.LazyStoragePropertyRequest 3,001 3,001 0 0.0%
Sema.LookupAllConformancesInContextRequest 84,585 84,585 0 0.0%
Sema.LookupConformanceInModuleRequest 38,315,717 38,434,976 119,259 0.31%
Sema.LookupInModuleRequest 7,564,972 7,580,562 15,590 0.21%
Sema.LookupInfixOperatorRequest 97,784 97,784 0 0.0%
Sema.LookupPostfixOperatorRequest 215 215 0 0.0%
Sema.LookupPrecedenceGroupRequest 32,424 32,424 0 0.0%
Sema.LookupPrefixOperatorRequest 716 716 0 0.0%
Sema.MangleLocalTypeDeclRequest 510 510 0 0.0%
Sema.ModuleQualifiedLookupRequest 3,427,821 3,441,004 13,183 0.38%
Sema.NamedLazyMemberLoadSuccessCount 23,278,074 23,270,286 -7,788 -0.03%
Sema.NamingPatternRequest 240,477 240,496 19 0.01%
Sema.NeedsNewVTableEntryRequest 716,580 716,580 0 0.0%
Sema.NumAccessorBodiesSynthesized 193,492 193,492 0 0.0%
Sema.NumAccessorsSynthesized 305,284 305,284 0 0.0%
Sema.NumConstraintScopes 32,706,319 32,724,754 18,435 0.06%
Sema.NumConstraintsConsideredForEdgeContraction 114,394,465 114,397,486 3,021 0.0%
Sema.NumCrossImportsChecked 0 0 0 0.0%
Sema.NumCrossImportsFound 0 0 0 0.0%
Sema.NumCyclicOneWayComponentsCollapsed 0 0 0 0.0%
Sema.NumDeclsTypechecked 1,450,256 1,450,256 0 0.0%
Sema.NumGenericSignatureBuilders 1,525,213 1,533,333 8,120 0.53%
Sema.NumLazyIterableDeclContexts 10,330,008 10,376,896 46,888 0.45%
Sema.NumLazyRequirementSignatures 1,081,955 1,083,426 1,471 0.14%
Sema.NumLazyRequirementSignaturesLoaded 771,790 772,786 996 0.13%
Sema.NumLeafScopes 20,663,903 20,679,942 16,039 0.08%
Sema.NumTypesDeserialized 25,873,954 26,071,169 197,215 0.76%
Sema.NumTypesValidated 1,592,249 1,592,279 30 0.0%
Sema.NumUnloadedLazyIterableDeclContexts 7,003,838 6,983,676 -20,162 -0.29%
Sema.OpaqueReadOwnershipRequest 291,533 291,533 0 0.0%
Sema.OpaqueResultTypeRequest 0 0 0 0.0%
Sema.OperatorPrecedenceGroupRequest 749 749 0 0.0%
Sema.ParamSpecifierRequest 1,343,055 1,343,063 8 0.0%
Sema.PatternBindingEntryRequest 504,487 504,506 19 0.0%
Sema.PatternTypeRequest 579,030 579,049 19 0.0%
Sema.PreCheckFunctionBuilderRequest 0 0 0 0.0%
Sema.PropertyWrapperBackingPropertyInfoRequest 576,982 576,982 0 0.0%
Sema.PropertyWrapperBackingPropertyTypeRequest 582,003 582,003 0 0.0%
Sema.PropertyWrapperMutabilityRequest 651,232 651,232 0 0.0%
Sema.PropertyWrapperTypeInfoRequest 7 7 0 0.0%
Sema.ProtocolRequiresClassRequest 45,203 45,199 -4 -0.01%
Sema.QualifiedLookupRequest 5,787,568 5,814,876 27,308 0.47%
Sema.RangeInfoRequest 0 0 0 0.0%
Sema.RequirementRequest 120,600 120,607 7 0.01%
Sema.RequirementSignatureRequest 839,757 840,877 1,120 0.13%
Sema.RequiresOpaqueAccessorsRequest 1,364,582 1,364,582 0 0.0%
Sema.RequiresOpaqueModifyCoroutineRequest 281,581 281,581 0 0.0%
Sema.ResilienceExpansionRequest 1,937,377 1,937,429 52 0.0%
Sema.ResolveEffectiveMemberwiseInitRequest 0 0 0 0.0%
Sema.ResolveImplicitMemberRequest 392,721 395,481 2,760 0.7%
Sema.ResolveProtocolNameRequest 0 0 0 0.0%
Sema.ResultTypeRequest 713,235 713,256 21 0.0%
Sema.RootAndResultTypeOfKeypathDynamicMemberRequest 0 0 0 0.0%
Sema.RootTypeOfKeypathDynamicMemberRequest 0 0 0 0.0%
Sema.ScopedImportLookupRequest 1,076 1,076 0 0.0%
Sema.SelfAccessKindRequest 681,728 682,449 721 0.11%
Sema.SelfBoundsFromWhereClauseRequest 1,933,728 1,942,606 8,878 0.46%
Sema.SetterAccessLevelRequest 149,841 149,841 0 0.0%
Sema.StorageImplInfoRequest 1,504,782 1,504,782 0 0.0%
Sema.StoredPropertiesAndMissingMembersRequest 34,585 34,585 0 0.0%
Sema.StoredPropertiesRequest 392,328 392,328 0 0.0%
Sema.StructuralTypeRequest 2,348 2,348 0 0.0%
Sema.SuperclassDeclRequest 519,409 520,614 1,205 0.23%
Sema.SuperclassTypeRequest 62,698 62,698 0 0.0%
Sema.SynthesizeAccessorRequest 305,284 305,284 0 0.0%
Sema.SynthesizeDefaultInitRequest 5,502 5,502 0 0.0%
Sema.SynthesizeMemberwiseInitRequest 3,321 3,321 0 0.0%
Sema.TypeCheckFunctionBodyUntilRequest 543,354 543,354 0 0.0%
Sema.TypeCheckSourceFileRequest 27,826 27,826 0 0.0%
Sema.TypeDeclsFromWhereClauseRequest 31,670 31,673 3 0.01%
Sema.TypeEraserHasViableInitRequest 0 0 0 0.0%
Sema.TypeRelationCheckRequest 0 0 0 0.0%
Sema.TypeWitnessRequest 10,185 10,190 5 0.05%
Sema.UnderlyingTypeDeclsReferencedRequest 311,663 314,641 2,978 0.96%
Sema.UnderlyingTypeRequest 40,128 40,130 2 0.0%
Sema.UnqualifiedLookupRequest 4,585,022 4,587,465 2,443 0.05%
Sema.ValidatePrecedenceGroupRequest 182,895 182,895 0 0.0%
Sema.ValueWitnessRequest 71,334 71,334 0 0.0%
TBDGen.GenerateTBDRequest 27,526 27,526 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 55,649,897,155,783 55,830,591,207,951 180,694,052,168 0.32%
LLVM.NumLLVMBytesOutput 1,856,159,448 1,862,647,864 6,488,416 0.35%
time.swift-driver.wall 10234.2s 10227.2s -7.0s -0.07%

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) (17)
name old new delta delta_pct
AST.NumLoadedModules 31,800 31,800 0 0.0%
AST.NumTotalClangImportedEntities 466,355 466,355 0 0.0%
IRModule.NumIRBasicBlocks 4,916,857 4,917,527 670 0.01%
IRModule.NumIRFunctions 2,826,914 2,841,735 14,821 0.52%
IRModule.NumIRGlobals 3,324,399 3,325,442 1,043 0.03%
IRModule.NumIRInsts 49,764,872 49,716,728 -48,144 -0.1%
IRModule.NumIRValueSymbols 5,783,975 5,799,874 15,899 0.27%
LLVM.NumLLVMBytesOutput 1,856,159,448 1,862,647,864 6,488,416 0.35%
SILModule.NumSILGenFunctions 1,228,854 1,228,854 0 0.0%
SILModule.NumSILOptFunctions 1,034,579 1,041,192 6,613 0.64%
Sema.NumConformancesDeserialized 3,554,237 3,558,931 4,694 0.13%
Sema.NumConstraintScopes 32,359,779 32,359,772 -7 -0.0%
Sema.NumDeclsDeserialized 11,082,563 11,082,205 -358 -0.0%
Sema.NumGenericSignatureBuilders 277,319 277,298 -21 -0.01%
Sema.NumLazyIterableDeclContexts 1,375,671 1,375,651 -20 -0.0%
Sema.NumTypesDeserialized 5,384,354 5,380,088 -4,266 -0.08%
Sema.NumTypesValidated 847,880 847,880 0 0.0%

@gottesmm
Copy link
Contributor

@meg-gupta can you give a more descriptive commit message? I think the title of the PR would be fine for the commit title and I would add to the commit msg the general effort you are working on.

@meg-gupta meg-gupta changed the title [DNM] [SILOptimizer] Update newly added SILFunction's position in PassManager's worklist [DNM] [PassManager] Update PassManager's function worklist for newly added SILFunctions Mar 30, 2020
@gottesmm
Copy link
Contributor

@meg-gupta Nice! That is a really great commit message! = ).

@meg-gupta meg-gupta changed the title [DNM] [PassManager] Update PassManager's function worklist for newly added SILFunctions [PassManager] Update PassManager's function worklist for newly added SILFunctions Mar 31, 2020
@meg-gupta meg-gupta marked this pull request as ready for review March 31, 2020 05:38
void SILPassManager::recursivelyUpdateFunctionWorklist(
SILFunction *F, SmallPtrSetImpl<SILFunction *> &Visited) {
BasicCalleeAnalysis *BCA = getAnalysis<BasicCalleeAnalysis>();
auto findFunc = [this](SILFunction *Func) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This linear search results in quadratic complexity. The FunctionWorkList can contain thousands of entries.
The same with FunctionWorklist.erase(CalleeIt).

What you could do is to use BottomUpFunctionOrder to get the list of functions which need to be reordered at the end of FunctionWorkList (see my previous comment).
Then in a single sweep reorder FunctionWorkList - depending if a function is in BottomUpFunctionOrder result list or not.

This can still be quadratic in case there are a lot of new functions added (but at least a single reorder is linear). To solve this problem, maybe it's sufficient to reorder the FunctionWorkList not every time a new function is added, but only if a correctly sorted list is needed: and that's mainly before the inliner runs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Am worried that it is not just the inliner which needs it in bottom up. ArrayPropertyOpt also computes profitability of callees. I have to look how many more function passes will look at callee function bodies.

@atrick
Copy link
Contributor

atrick commented Mar 31, 2020

@meg-gupta I don't care about benchmark code size at all, but before you commit can you check how bad the SCK code size regressions are?

@meg-gupta
Copy link
Contributor Author

@atrick I see only a minimal change. This list just consists of macos SCK:

Title                              Section             Old             New  Percent
NonEmpty                            __text:          49866           49946     0.2%
Title                              Section             Old             New  Percent
NonEmpty                            __text:          49866           49946     0.2%
Title                              Section             Old             New  Percent
NonEmpty                            __text:          49866           49946     0.2%
Title                              Section             Old             New  Percent
Kommander                           __text:          53018           53050     0.1%
Title                              Section             Old             New  Percent
Kommander                           __text:          53018           53050     0.1%
Title                              Section             Old             New  Percent
Kommander                           __text:          53018           53050     0.1%
Title                              Section             Old             New  Percent
SwiftyJSON                          __text:         108266          108394     0.1%
Title                              Section             Old             New  Percent
SwiftyJSON                          __text:         108266          108394     0.1%
Title                              Section             Old             New  Percent
SwiftyJSON                          __text:         108266          108394     0.1%
Title                              Section             Old             New  Percent
Alamofire                           __text:         583610          584362     0.1%
Title                              Section             Old             New  Percent
Alamofire                           __text:         583610          584362     0.1%
Title                              Section             Old             New  Percent
Alamofire                           __text:         583610          584362     0.1%
Title                              Section             Old             New  Percent
PromiseKit                          __text:         175738          175882     0.1%
Title                              Section             Old             New  Percent
PromiseKit                          __text:         175738          175882     0.1%
Title                              Section             Old             New  Percent
PromiseKit                          __text:         175738          175882     0.1%
Title                              Section             Old             New  Percent
Siesta                              __text:         342906          345530     0.8%
Title                              Section             Old             New  Percent
Siesta                              __text:         342906          345530     0.8%
Title                              Section             Old             New  Percent
Siesta                              __text:         342906          345530     0.8%
Title                              Section             Old             New  Percent
SiestaUI                            __text:              0               0       - 
Title                              Section             Old             New  Percent
SiestaUI                            __text:              0               0       - 
Title                              Section             Old             New  Percent
SiestaUI                            __text:              0               0       - 
Title                              Section             Old             New  Percent
Cub                                 __text:         546410          548970     0.5%
Title                              Section             Old             New  Percent
Cub                                 __text:         546410          548970     0.5%
Title                              Section             Old             New  Percent
Cub                                 __text:         546410          548970     0.5%
Title                              Section             Old             New  Percent
RxTest                              __text:          59530           59658     0.2%
Title                              Section             Old             New  Percent
RxTest                              __text:          59530           59658     0.2%
Title                              Section             Old             New  Percent
RxSwift                             __text:         654634          655098     0.1%
Title                              Section             Old             New  Percent
RxTest                              __text:          59530           59658     0.2%
Title                              Section             Old             New  Percent
RxSwift                             __text:         654634          655098     0.1%
Title                              Section             Old             New  Percent
RxSwift                             __text:         654634          655098     0.1%
Title                              Section             Old             New  Percent
Kronos                              __text:          51008           51632     1.2%
Title                              Section             Old             New  Percent
Kronos                              __text:          51008           51632     1.2%
Title                              Section             Old             New  Percent
Kronos                              __text:          51008           51632     1.2%
Title                              Section             Old             New  Percent
SwifterSwift                        __text:         287066          286890    -0.1%
Title                              Section             Old             New  Percent
SwifterSwift                        __text:         287066          286890    -0.1%
Title                              Section             Old             New  Percent
SwifterSwift                        __text:         287066          286890    -0.1%
Title                              Section             Old             New  Percent
Tagged                              __text:          15082           15082     0.0%
Title                              Section             Old             New  Percent
Tagged                              __text:          15082           15082     0.0%
Title                              Section             Old             New  Percent
Tagged                              __text:          15082           15082     0.0%
Title                              Section             Old             New  Percent
Mapper                              __text:          33914           33962     0.1%
Title                              Section             Old             New  Percent
Mapper                              __text:          33914           33962     0.1%
Title                              Section             Old             New  Percent
Mapper                              __text:          33914           33962     0.1%
Title                              Section             Old             New  Percent
Surge                               __text:          91578           91274    -0.3%
Title                              Section             Old             New  Percent
Surge                               __text:          91578           91274    -0.3%
Title                              Section             Old             New  Percent
Surge                               __text:          91578           91274    -0.3%
Title                              Section             Old             New  Percent
Dollar                              __text:         147914          148186     0.2%
Title                              Section             Old             New  Percent
Dollar                              __text:         147914          148186     0.2%
Title                              Section             Old             New  Percent
RSCore                              __text:          88685           89101     0.5%
Title                              Section             Old             New  Percent
RSCore                              __text:          88685           89101     0.5%
Title                              Section             Old             New  Percent
RSWeb                               __text:          69194           69642     0.6%
Title                              Section             Old             New  Percent
RSTree                              __text:          22410           22138    -1.2%
Title                              Section             Old             New  Percent
Data                                __text:          61690           61498    -0.3%
Title                              Section             Old             New  Percent
Data                                __text:          61690           61498    -0.3%
Title                              Section             Old             New  Percent
Data                                __text:          61690           61498    -0.3%
Title                              Section             Old             New  Percent
Account                             __text:         114026          114554     0.5%
Title                              Section             Old             New  Percent
RSDatabase                          __text:         134592          134944     0.3%
Title                              Section             Old             New  Percent
Evergreen                           __text:         610170          615802     0.9%
Title                              Section             Old             New  Percent
libswiftAppKit.dylib                __text:          43627           43627     0.0%
Title                              Section             Old             New  Percent
libswiftCoreImage.dylib             __text:              1               1     0.0%
Title                              Section             Old             New  Percent
libswiftObjectiveC.dylib            __text:           2731            2731     0.0%
Title                              Section             Old             New  Percent
libswiftXPC.dylib                   __text:            737             737     0.0%
Title                              Section             Old             New  Percent
libswiftCore.dylib                  __text:        3305354         3305354     0.0%
Title                              Section             Old             New  Percent
libswiftCoreGraphics.dylib          __text:          35147           35147     0.0%
Title                              Section             Old             New  Percent
libswiftMetal.dylib                 __text:           5435            5435     0.0%
Title                              Section             Old             New  Percent
libswiftCoreData.dylib              __text:          10545           10545     0.0%
Title                              Section             Old             New  Percent
libswiftDispatch.dylib              __text:          66103           66103     0.0%
Title                              Section             Old             New  Percent
libswiftos.dylib                    __text:          13018           13018     0.0%
Title                              Section             Old             New  Percent
libswiftCoreFoundation.dylib          __text:            113             113     0.0%
Title                              Section             Old             New  Percent
libswiftDarwin.dylib                __text:          17787           17787     0.0%
Title                              Section             Old             New  Percent
libswiftQuartzCore.dylib            __text:           1441            1441     0.0%
Title                              Section             Old             New  Percent
libswiftIOKit.dylib                 __text:            833             833     0.0%
Title                              Section             Old             New  Percent
libswiftFoundation.dylib            __text:        1497851         1497851     0.0%
Title                              Section             Old             New  Percent
RSCore                              __text:          88685           89101     0.5%
Title                              Section             Old             New  Percent
RSCore                              __text:          88685           89101     0.5%
Title                              Section             Old             New  Percent
Sparkle                             __text:         167431          167431     0.0%
Title                              Section             Old             New  Percent
Sparkle                             __text:         167431          167431     0.0%
Title                              Section             Old             New  Percent
Data                                __text:          61690           61498    -0.3%
Title                              Section             Old             New  Percent
Data                                __text:          61690           61498    -0.3%
Title                              Section             Old             New  Percent
RSDatabase                          __text:         134592          134944     0.3%
Title                              Section             Old             New  Percent
DB5                                 __text:           6098            6098     0.0%
Title                              Section             Old             New  Percent
DB5                                 __text:           6098            6098     0.0%
Title                              Section             Old             New  Percent
Database                            __text:         122394          122714     0.3%
Title                              Section             Old             New  Percent
Database                            __text:         122394          122714     0.3%
Title                              Section             Old             New  Percent
RSTree                              __text:          22410           22138    -1.2%
Title                              Section             Old             New  Percent
RSTree                              __text:          22410           22138    -1.2%
Title                              Section             Old             New  Percent
Account                             __text:         114026          114554     0.5%
Title                              Section             Old             New  Percent
Account                             __text:         114026          114554     0.5%
Title                              Section             Old             New  Percent
RSParser                            __text:         136522          136442    -0.1%
Title                              Section             Old             New  Percent
RSParser                            __text:         136522          136442    -0.1%
Title                              Section             Old             New  Percent
RSWeb                               __text:          69194           69642     0.6%
Title                              Section             Old             New  Percent
RSWeb                               __text:          69194           69642     0.6%
Title                              Section             Old             New  Percent
RSDatabase                          __text:         134592          134944     0.3%
Title                              Section             Old             New  Percent
RSDatabase                          __text:         134592          134944     0.3%
Title                              Section             Old             New  Percent
RSCore                              __text:          88685           89101     0.5%
Title                              Section             Old             New  Percent
Evergreen                           __text:         610170          615802     0.9%
Title                              Section             Old             New  Percent
DB5                                 __text:           6098            6098     0.0%
Title                              Section             Old             New  Percent
DB5                                 __text:           6098            6098     0.0%
Title                              Section             Old             New  Percent
Database                            __text:         122394          122714     0.3%
Title                              Section             Old             New  Percent
Database                            __text:         122394          122714     0.3%
Title                              Section             Old             New  Percent
DB5                                 __text:           6098            6098     0.0%
Title                              Section             Old             New  Percent
RSTree                              __text:          22410           22138    -1.2%
Title                              Section             Old             New  Percent
RSTree                              __text:          22410           22138    -1.2%
Title                              Section             Old             New  Percent
Account                             __text:         114026          114554     0.5%
Title                              Section             Old             New  Percent
Account                             __text:         114026          114554     0.5%
Title                              Section             Old             New  Percent
RSParser                            __text:         136522          136442    -0.1%
Title                              Section             Old             New  Percent
RSParser                            __text:         136522          136442    -0.1%
Title                              Section             Old             New  Percent
Database                            __text:         122394          122714     0.3%
Title                              Section             Old             New  Percent
RSWeb                               __text:          69194           69642     0.6%
Title                              Section             Old             New  Percent
RSWeb                               __text:          69194           69642     0.6%
Title                              Section             Old             New  Percent
RSParser                            __text:         136522          136442    -0.1%
Title                              Section             Old             New  Percent
Sparkle                             __text:         167431          167431     0.0%
Title                              Section             Old             New  Percent
Sparkle                             __text:         167431          167431     0.0%
Title                              Section             Old             New  Percent
Autoupdate                          __text:          68626           68626     0.0%
Title                              Section             Old             New  Percent
ReactiveKit                         __text:         313642          313386    -0.1%
Title                              Section             Old             New  Percent
ReactiveKit                         __text:         313642          313386    -0.1%
Title                              Section             Old             New  Percent
ReactiveKit                         __text:         313642          313386    -0.1%
Title                              Section             Old             New  Percent
AsyncNinja                          __text:         580250          580682     0.1%
Title                              Section             Old             New  Percent
AsyncNinja                          __text:         580250          580682     0.1%
Title                              Section             Old             New  Percent
AsyncNinja                          __text:         580250          580682     0.1%
Title                              Section             Old             New  Percent
ProcedureKitCloud                   __text:         197418          197418     0.0%
Title                              Section             Old             New  Percent
ProcedureKit                        __text:         511994          513498     0.3%
Title                              Section             Old             New  Percent
ProcedureKit                        __text:         511994          513498     0.3%
Title                              Section             Old             New  Percent
ProcedureKit                        __text:         511994          513498     0.3%
Title                              Section             Old             New  Percent
ProcedureKitCloud                   __text:         197418          197418     0.0%
Title                              Section             Old             New  Percent
ProcedureKitCloud                   __text:         197418          197418     0.0%
Title                              Section             Old             New  Percent
Overture                            __text:         397514          397514     0.0%
Title                              Section             Old             New  Percent
Overture                            __text:         397514          397514     0.0%
Title                              Section             Old             New  Percent
Overture                            __text:         397514          397514     0.0%
Title                              Section             Old             New  Percent
SwiftyStoreKit                      __text:         125162          125290     0.1%
Title                              Section             Old             New  Percent
SwiftyStoreKit                      __text:         125162          125290     0.1%
Title                              Section             Old             New  Percent
SwiftyStoreKit                      __text:         125162          125290     0.1%
Title                              Section             Old             New  Percent
ReactiveSwift                       __text:         550506          549322    -0.2%
Title                              Section             Old             New  Percent
ReactiveSwift                       __text:         550506          549322    -0.2%
Title                              Section             Old             New  Percent
ReactiveSwift                       __text:         550506          549322    -0.2%
Title                              Section             Old             New  Percent
CoreStore                           __text:        1223450         1222666    -0.1%
Title                              Section             Old             New  Percent
CoreStore                           __text:        1223450         1222666    -0.1%
Title                              Section             Old             New  Percent
CoreStore                           __text:        1223450         1222666    -0.1%
Title                              Section             Old             New  Percent
ReactiveSwift                       __text:         460954          459610    -0.3%
Title                              Section             Old             New  Percent
ReactiveSwift                       __text:         460954          459610    -0.3%
Title                              Section             Old             New  Percent
ReactiveCocoa                       __text:          84698           84922     0.3%
Title                              Section             Old             New  Percent
ReactiveCocoa                       __text:          84698           84922     0.3%
Title                              Section             Old             New  Percent
ReactiveMapKit                      __text:          11450           11450     0.0%
Title                              Section             Old             New  Percent
ReactiveMapKit                      __text:          11450           11450     0.0%
Title                              Section             Old             New  Percent
ReactiveMapKit                      __text:          11450           11450     0.0%
Title                              Section             Old             New  Percent
ReactiveCocoa                       __text:          84698           84922     0.3%
Title                              Section             Old             New  Percent
ReactiveSwift                       __text:         460954          459610    -0.3%
Title                              Section             Old             New  Percent
PinkyPromise                        __text:          67898           67898     0.0%
Title                              Section             Old             New  Percent
PinkyPromise                        __text:          67898           67898     0.0%
Title                              Section             Old             New  Percent
PinkyPromise                        __text:          67898           67898     0.0%
Title                              Section             Old             New  Percent
SwiftDate                           __text:        1233578         1233562    -0.0%
Title                              Section             Old             New  Percent
SwiftDate                           __text:        1233578         1233562    -0.0%
Title                              Section             Old             New  Percent
SwiftDate                           __text:        1233578         1233562    -0.0%
Title                              Section             Old             New  Percent
Socket                              __text:          87018           86906    -0.1%
Title                              Section             Old             New  Percent
Socket                              __text:          87018           86906    -0.1%
Title                              Section             Old             New  Percent
Socket                              __text:          87018           86906    -0.1%
Title                              Section             Old             New  Percent
ReSwift                             __text:          50666           50618    -0.1%
Title                              Section             Old             New  Percent
ReSwift                             __text:          50666           50618    -0.1%
Title                              Section             Old             New  Percent
ReSwift                             __text:          50666           50618    -0.1%
Title                              Section             Old             New  Percent
Kingfisher                          __text:         474586          474698     0.0%
Title                              Section             Old             New  Percent
Kingfisher                          __text:         474586          474698     0.0%
Title                              Section             Old             New  Percent
Kingfisher                          __text:         474586          474698     0.0%
Title                              Section             Old             New  Percent
CleanroomLogger                     __text:          92346           92330    -0.0%
Title                              Section             Old             New  Percent
CleanroomLogger                     __text:          92346           92330    -0.0%
Title                              Section             Old             New  Percent
ObjectMapper                        __text:         133258          133578     0.2%
Title                              Section             Old             New  Percent
ObjectMapper                        __text:         133258          133578     0.2%
Title                              Section             Old             New  Percent
ObjectMapper                        __text:         133258          133578     0.2%
Title                              Section             Old             New  Percent
KeychainAccess                      __text:          86330           86858     0.6%
Title                              Section             Old             New  Percent
KeychainAccess                      __text:          86330           86858     0.6%

@meg-gupta
Copy link
Contributor Author

@swift-ci please benchmark

@swift-ci
Copy link
Contributor

swift-ci commented Apr 3, 2020

Performance: -O

Regression OLD NEW DELTA RATIO
CSVParsing.UTF8 23 58 +152.2% 0.40x
CSVParsing.UTF16 36 74 +105.6% 0.49x
ArrayAppendRepeatCol 400 680 +70.0% 0.59x
CharacterPropertiesPrecomputed 550 870 +58.2% 0.63x
CSVParsingAltIndices2 605 924 +52.7% 0.65x
ArrayAppendLatin1Substring 23436 33588 +43.3% 0.70x
ArrayAppendUTF16Substring 22968 32616 +42.0% 0.70x
ArrayAppendAsciiSubstring 23436 32688 +39.5% 0.72x
CSVParsing.Scalar 131 172 +31.3% 0.76x
NormalizedIterator_ascii 83 107 +28.9% 0.78x
Set.subtracting.Empty.Box 7 9 +28.6% 0.78x
Set.isSuperset.Seq.Empty.Int 42 53 +26.2% 0.79x
Set.isDisjoint.Seq.Int.Empty 43 54 +25.6% 0.80x
DropLastArray 4 5 +25.0% 0.80x (?)
UnicodeStringFromCodable 330 410 +24.2% 0.80x
Set.isDisjoint.Seq.Box.Empty 78 93 +19.2% 0.84x
UTF8Decode_InitDecoding 144 171 +18.7% 0.84x
COWTree 2420 2860 +18.2% 0.85x
NormalizedIterator_latin1 212 250 +17.9% 0.85x (?)
Set.isStrictSubset.Seq.Int.Empty 107 126 +17.8% 0.85x
Set.isDisjoint.Box.Empty 88 102 +15.9% 0.86x
AngryPhonebook.Strasse 138 159 +15.2% 0.87x (?)
Set.isSubset.Int.Empty 47 54 +14.9% 0.87x
NormalizedIterator_fastPrenormal 620 710 +14.5% 0.87x
Set.isStrictSuperset.Seq.Empty.Int 153 175 +14.4% 0.87x (?)
Set.isSubset.Seq.Int.Empty 111 126 +13.5% 0.88x
ArrayLiteral2 67 76 +13.4% 0.88x (?)
StringComparison_fastPrenormal 680 770 +13.2% 0.88x (?)
Set.isStrictSubset.Int.Empty 47 53 +12.8% 0.89x (?)
AngryPhonebook.Armenian 158 178 +12.7% 0.89x
StringComparison_latin1 444 498 +12.2% 0.89x (?)
ArrayPlusEqualThreeElements 1260 1410 +11.9% 0.89x (?)
AngryPhonebook.Cyrillic 170 189 +11.2% 0.90x (?)
MapReduce 197 219 +11.2% 0.90x (?)
LazilyFilteredArrayContains 21200 23500 +10.8% 0.90x
IterateData 851 943 +10.8% 0.90x (?)
CharacterLiteralsLarge 65 71 +9.2% 0.92x
RangeReplaceableCollectionPlusDefault 580 632 +9.0% 0.92x (?)
SortStringsUnicode 2165 2335 +7.9% 0.93x (?)
StringHashing_latin1 204 220 +7.8% 0.93x (?)
CharacterLiteralsSmall 198 213 +7.6% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
SuffixAnySequence 1738 252 -85.5% 6.90x
DropLastAnySequence 1484 336 -77.4% 4.42x
ArrayAppendSequence 670 370 -44.8% 1.81x
SortIntPyramid 730 455 -37.7% 1.60x
EqualSubstringSubstringGenericEquatable 31 21 -32.3% 1.48x
EqualSubstringSubstring 30 21 -30.0% 1.43x
LessSubstringSubstring 30 21 -30.0% 1.43x
EqualSubstringString 30 21 -30.0% 1.43x
LessSubstringSubstringGenericComparable 30 21 -30.0% 1.43x
SortAdjacentIntPyramids 935 655 -29.9% 1.43x
EqualStringSubstring 31 22 -29.0% 1.41x
ObjectiveCBridgeStubDateAccess 152 130 -14.5% 1.17x
Data.hash.Empty 52 45 -13.5% 1.16x (?)
SubstringEqualString 293 257 -12.3% 1.14x (?)
RemoveWhereMoveInts 19 17 -10.5% 1.12x (?)
StringHasPrefixAscii 1320 1190 -9.8% 1.11x
AngryPhonebook.ASCII.Small 12 11 -8.3% 1.09x (?)
ArrayPlusEqualFiveElementCollection 4736 4366 -7.8% 1.08x (?)
ArraySetElement 284 262 -7.7% 1.08x (?)
PrefixWhileSequence 179 166 -7.3% 1.08x (?)
RandomShuffleLCG2 448 416 -7.1% 1.08x (?)
Calculator 147 137 -6.8% 1.07x (?)

Code size: -O

Regression OLD NEW DELTA RATIO
COWTree.o 11684 21204 +81.5% 0.55x
ReduceInto.o 10932 13948 +27.6% 0.78x
ArraySetElement.o 1240 1334 +7.6% 0.93x
DiffingMyers.o 6485 6973 +7.5% 0.93x
COWArrayGuaranteedParameterOverhead.o 1315 1409 +7.1% 0.93x
Sim2DArray.o 1320 1414 +7.1% 0.93x
ArraySubscript.o 2858 3007 +5.2% 0.95x
Array2D.o 2984 3134 +5.0% 0.95x
Join.o 1615 1689 +4.6% 0.96x
MapReduce.o 27767 28975 +4.4% 0.96x
Memset.o 2215 2309 +4.2% 0.96x
BinaryFloatingPointProperties.o 5676 5914 +4.2% 0.96x
XorLoop.o 2132 2221 +4.2% 0.96x
StackPromo.o 2217 2305 +4.0% 0.96x
RangeOverlaps.o 6136 6374 +3.9% 0.96x
MonteCarloE.o 2788 2891 +3.7% 0.96x
ArrayOfGenericRef.o 8966 9286 +3.6% 0.97x
CharacterProperties.o 22593 23385 +3.5% 0.97x
SortArrayInClass.o 2738 2832 +3.4% 0.97x
ArrayOfRef.o 9379 9699 +3.4% 0.97x
PopFrontGeneric.o 2744 2832 +3.2% 0.97x
ObserverForwarderStruct.o 2852 2940 +3.1% 0.97x
Phonebook.o 9159 9431 +3.0% 0.97x
ObserverClosure.o 2478 2550 +2.9% 0.97x
ObserverPartiallyAppliedMethod.o 2525 2597 +2.9% 0.97x
ClassArrayGetter.o 3819 3923 +2.7% 0.97x
RangeAssignment.o 3276 3365 +2.7% 0.97x
Hanoi.o 3120 3204 +2.7% 0.97x
SortLettersInPlace.o 8501 8728 +2.7% 0.97x
NopDeinit.o 4007 4111 +2.6% 0.97x
Prims.o 12875 13187 +2.4% 0.98x
PrimsSplit.o 12927 13239 +2.4% 0.98x
PopFront.o 3923 4011 +2.2% 0.98x
ArrayInClass.o 4527 4621 +2.1% 0.98x
FlattenList.o 4346 4434 +2.0% 0.98x
BucketSort.o 8499 8659 +1.9% 0.98x
StringWalk.o 40321 41025 +1.7% 0.98x
ObserverUnappliedMethod.o 5089 5177 +1.7% 0.98x
RandomTree.o 12375 12575 +1.6% 0.98x
RangeReplaceableCollectionPlusDefault.o 5564 5652 +1.6% 0.98x
DictionaryGroup.o 12691 12883 +1.5% 0.99x
ArrayAppend.o 26063 26439 +1.4% 0.99x
Combos.o 5070 5142 +1.4% 0.99x
Walsh.o 6364 6452 +1.4% 0.99x
PrimsNonStrongRef.o 121112 122712 +1.3% 0.99x
StaticArray.o 11991 12144 +1.3% 0.99x
LazyFilter.o 8365 8469 +1.2% 0.99x
CSVParsing.o 53588 54252 +1.2% 0.99x
FindStringNaive.o 9587 9691 +1.1% 0.99x
 
Improvement OLD NEW DELTA RATIO
RandomShuffle.o 3632 3566 -1.8% 1.02x
ChainedFilterMap.o 3637 3581 -1.5% 1.02x
Suffix.o 24013 23653 -1.5% 1.02x
UTF8Decode.o 13468 13268 -1.5% 1.02x
WordCount.o 39041 38609 -1.1% 1.01x

Performance: -Osize

Regression OLD NEW DELTA RATIO
CSVParsing.UTF8 26 59 +126.9% 0.44x
DropLastArray 4 9 +125.0% 0.44x
DropLastCountableRangeLazy 4 9 +125.0% 0.44x
SuffixArray 4 9 +125.0% 0.44x
PrefixCountableRangeLazy 13 26 +100.0% 0.50x
CSVParsing.UTF16 38 74 +94.7% 0.51x
DropFirstArray 14 26 +85.7% 0.54x
StringWalk 920 1640 +78.3% 0.56x
CharacterPropertiesPrecomputed 550 880 +60.0% 0.63x
DropWhileArray 21 33 +57.1% 0.64x
ArrayAppendAsciiSubstring 20988 32760 +56.1% 0.64x
ArrayAppendLatin1Substring 21384 33372 +56.1% 0.64x
ArrayAppendUTF16Substring 20952 32688 +56.0% 0.64x
StrComplexWalk 1940 2980 +53.6% 0.65x
SuffixCountableRangeLazy 6 9 +50.0% 0.67x
PrefixWhileSequenceLazy 27 40 +48.1% 0.68x
CSVParsingAltIndices2 682 979 +43.5% 0.70x
DropFirstSequence 33 44 +33.3% 0.75x
DropFirstSequenceLazy 33 44 +33.3% 0.75x
NormalizedIterator_ascii 81 107 +32.1% 0.76x
PrefixWhileCountableRangeLazy 20 26 +30.0% 0.77x (?)
CSVParsing.Scalar 132 167 +26.5% 0.79x
DropWhileSequenceLazy 53 67 +26.4% 0.79x
DropWhileAnySeqCntRange 100 124 +24.0% 0.81x
Dictionary 380 465 +22.4% 0.82x
NormalizedIterator_latin1 208 254 +22.1% 0.82x
UnicodeStringFromCodable 334 407 +21.9% 0.82x
Dictionary3 163 197 +20.9% 0.83x
NormalizedIterator_fastPrenormal 610 730 +19.7% 0.84x
UTF8Decode_InitDecoding 141 166 +17.7% 0.85x (?)
AngryPhonebook.Strasse 138 159 +15.2% 0.87x (?)
Set.isStrictSuperset.Seq.Empty.Int 155 176 +13.5% 0.88x
StringComparison_fastPrenormal 680 770 +13.2% 0.88x
StringComparison_latin1 446 500 +12.1% 0.89x (?)
AngryPhonebook.Armenian 159 178 +11.9% 0.89x (?)
DropWhileAnySeqCRangeIter 111 124 +11.7% 0.90x (?)
FindString.Rec3.String 163 182 +11.7% 0.90x (?)
PrefixWhileSequence 193 215 +11.4% 0.90x (?)
AngryPhonebook.Cyrillic 171 190 +11.1% 0.90x (?)
SubstringComparable 9 10 +11.1% 0.90x (?)
CharacterPropertiesStashed 740 820 +10.8% 0.90x (?)
Set.isStrictSubset.Seq.Int.Empty 111 123 +10.8% 0.90x (?)
Dictionary4OfObjects 262 289 +10.3% 0.91x
FindString.Rec3.Substring 196 216 +10.2% 0.91x (?)
PrefixAnySeqCRangeIterLazy 98 108 +10.2% 0.91x (?)
PrefixAnySeqCntRangeLazy 98 108 +10.2% 0.91x (?)
COWArrayGuaranteedParameterOverhead 2650 2900 +9.4% 0.91x (?)
Dictionary4 204 223 +9.3% 0.91x (?)
StringHashing_latin1 202 220 +8.9% 0.92x (?)
ArrayPlusEqualThreeElements 1350 1470 +8.9% 0.92x (?)
Set.isSubset.Seq.Int.Empty 110 119 +8.2% 0.92x (?)
 
Improvement OLD NEW DELTA RATIO
DropLastAnySequence 1760 461 -73.8% 3.82x
SuffixAnySequence 1848 685 -62.9% 2.70x
DropLastCountableRange 9 4 -55.5% 2.25x
PrefixCountableRange 26 13 -50.0% 2.00x
PrefixWhileCountableRange 26 13 -50.0% 2.00x
PrefixArrayLazy 26 13 -50.0% 2.00x
PrefixArray 26 13 -50.0% 2.00x
DropFirstArrayLazy 26 14 -46.2% 1.86x
DropLastArrayLazy 9 5 -44.4% 1.80x
ArrayAppendRepeatCol 850 500 -41.2% 1.70x
PrefixSequenceLazy 40 26 -35.0% 1.54x
PrefixSequence 40 26 -35.0% 1.54x
SuffixCountableRange 6 4 -33.3% 1.50x
MapReduceLazyCollectionShort 67 47 -29.9% 1.43x
EqualSubstringSubstring 31 22 -29.0% 1.41x
LessSubstringSubstring 31 22 -29.0% 1.41x
EqualStringSubstring 31 22 -29.0% 1.41x
EqualSubstringSubstringGenericEquatable 31 22 -29.0% 1.41x
EqualSubstringString 31 22 -29.0% 1.41x
LessSubstringSubstringGenericComparable 31 22 -29.0% 1.41x
PrefixWhileArray 54 41 -24.1% 1.32x
DropWhileCountableRangeLazy 71 58 -18.3% 1.22x
DropFirstCountableRangeLazy 17 14 -17.6% 1.21x (?)
DropWhileCountableRange 17 14 -17.6% 1.21x (?)
DropFirstCountableRange 17 14 -17.6% 1.21x (?)
DropWhileAnyCollectionLazy 156 130 -16.7% 1.20x
MapReduceString 48 41 -14.6% 1.17x (?)
StringHasSuffixAscii 1390 1220 -12.2% 1.14x (?)
PrefixWhileAnySeqCRangeIter 200 179 -10.5% 1.12x (?)
StringHasPrefixAscii 1280 1150 -10.2% 1.11x
AngryPhonebook 280 252 -10.0% 1.11x (?)
Data.hash.Empty 50 45 -10.0% 1.11x (?)
SubstringEqualString 286 259 -9.4% 1.10x (?)
PrefixWhileAnySeqCntRange 197 179 -9.1% 1.10x (?)
MapReduceAnyCollection 237 217 -8.4% 1.09x (?)
AngryPhonebook.ASCII.Small 12 11 -8.3% 1.09x (?)
NormalizedIterator_zalgo 2325 2150 -7.5% 1.08x (?)

Code size: -Osize

Regression OLD NEW DELTA RATIO
COWTree.o 11884 13572 +14.2% 0.88x
DiffingMyers.o 6677 7325 +9.7% 0.91x
Array2D.o 2724 2957 +8.6% 0.92x
ArraySetElement.o 1286 1381 +7.4% 0.93x
Sim2DArray.o 1350 1445 +7.0% 0.93x
COWArrayGuaranteedParameterOverhead.o 1393 1488 +6.8% 0.94x
ArraySubscript.o 2832 2990 +5.6% 0.95x
Join.o 1655 1736 +4.9% 0.95x
XorLoop.o 2042 2140 +4.8% 0.95x
Memset.o 1989 2084 +4.8% 0.95x
StackPromo.o 2193 2297 +4.7% 0.95x
BinaryFloatingPointProperties.o 5371 5609 +4.4% 0.96x
RangeOverlaps.o 5854 6102 +4.2% 0.96x
ArrayOfGenericRef.o 9230 9582 +3.8% 0.96x
PopFrontGeneric.o 2768 2872 +3.8% 0.96x
ArrayOfRef.o 9587 9923 +3.5% 0.97x
RangeAssignment.o 3202 3306 +3.2% 0.97x
ObserverClosure.o 2858 2950 +3.2% 0.97x
ObserverPartiallyAppliedMethod.o 2905 2997 +3.2% 0.97x
ObserverForwarderStruct.o 2992 3083 +3.0% 0.97x
MonteCarloE.o 2954 3041 +2.9% 0.97x
PopFront.o 3561 3659 +2.8% 0.97x
ClassArrayGetter.o 3818 3922 +2.7% 0.97x
FlattenList.o 3930 4034 +2.6% 0.97x
SortLettersInPlace.o 8260 8468 +2.5% 0.98x
Walsh.o 4322 4426 +2.4% 0.98x
Prims.o 12203 12491 +2.4% 0.98x
PrimsSplit.o 12255 12543 +2.4% 0.98x
BucketSort.o 8331 8523 +2.3% 0.98x
NopDeinit.o 4583 4687 +2.3% 0.98x
RangeReplaceableCollectionPlusDefault.o 4850 4954 +2.1% 0.98x
ArrayInClass.o 4836 4931 +2.0% 0.98x
ObserverUnappliedMethod.o 5409 5513 +1.9% 0.98x
Hanoi.o 3303 3365 +1.9% 0.98x
Phonebook.o 9254 9420 +1.8% 0.98x
Combos.o 5390 5478 +1.6% 0.98x
StaticArray.o 11093 11261 +1.5% 0.99x
DictionaryGroup.o 11131 11299 +1.5% 0.99x
LazyFilter.o 7979 8083 +1.3% 0.99x
DropWhile.o 17940 18172 +1.3% 0.99x
PrefixWhile.o 16556 16756 +1.2% 0.99x
PrimsNonStrongRef.o 102516 103644 +1.1% 0.99x
CSVParsing.o 49844 50388 +1.1% 0.99x
DictionarySubscriptDefault.o 17083 17267 +1.1% 0.99x
Breadcrumbs.o 36840 37232 +1.1% 0.99x
SortLargeExistentials.o 20446 20654 +1.0% 0.99x
 
Improvement OLD NEW DELTA RATIO
SortArrayInClass.o 2958 2840 -4.0% 1.04x
RandomShuffle.o 3878 3749 -3.3% 1.03x
RomanNumbers.o 6846 6654 -2.8% 1.03x
Histogram.o 2834 2760 -2.6% 1.03x
ChainedFilterMap.o 3597 3509 -2.4% 1.03x
TwoSum.o 3710 3636 -2.0% 1.02x
WordCount.o 37727 37063 -1.8% 1.02x
Suffix.o 22227 21907 -1.4% 1.01x
DropLast.o 22237 21941 -1.3% 1.01x
Substring.o 16577 16377 -1.2% 1.01x
Hash.o 20531 20286 -1.2% 1.01x
Diffing.o 8611 8515 -1.1% 1.01x
ReversedCollections.o 8793 8705 -1.0% 1.01x

Performance: -Onone

Regression OLD NEW DELTA RATIO
StringWalk 2560 3320 +29.7% 0.77x
UnicodeStringFromCodable 337 412 +22.3% 0.82x
UTF8Decode_InitDecoding 166 192 +15.7% 0.86x (?)
AngryPhonebook.Strasse 138 159 +15.2% 0.87x (?)
DataAppendDataSmallToSmall 2860 3260 +14.0% 0.88x (?)
AngryPhonebook.Cyrillic 170 190 +11.8% 0.89x (?)
NormalizedIterator_fastPrenormal 950 1060 +11.6% 0.90x
StrComplexWalk 4720 5210 +10.4% 0.91x (?)
Set.subtracting.Seq.Empty.Int 317 342 +7.9% 0.93x (?)
NormalizedIterator_latin1 510 550 +7.8% 0.93x (?)
SortStringsUnicode 3005 3235 +7.7% 0.93x (?)
NormalizedIterator_ascii 317 341 +7.6% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
EqualSubstringSubstring 35 25 -28.6% 1.40x
EqualSubstringString 35 25 -28.6% 1.40x
LessSubstringSubstringGenericComparable 35 25 -28.6% 1.40x
EqualSubstringSubstringGenericEquatable 34 25 -26.5% 1.36x
LessSubstringSubstring 35 26 -25.7% 1.35x
EqualStringSubstring 35 26 -25.7% 1.35x (?)
SetUnionInt100 250 191 -23.6% 1.31x
Set.filter.Int100.24k 2893 2252 -22.2% 1.28x
Set.filter.Int100.20k 2455 1925 -21.6% 1.28x (?)
Set.filter.Int100.16k 2060 1642 -20.3% 1.25x
Set.filter.Int100.28k 3771 3026 -19.8% 1.25x
SetUnionInt25 392 318 -18.9% 1.23x
SetUnionInt50 350 285 -18.6% 1.23x
Set.filter.Int50.24k 1755 1437 -18.1% 1.22x
Set.filter.Int50.20k 1487 1222 -17.8% 1.22x
Set.filter.Int50.16k 1244 1033 -17.0% 1.20x
Set.filter.Int50.28k 2248 1885 -16.1% 1.19x
SetSymmetricDifferenceInt25 544 459 -15.6% 1.19x (?)
SetIntersectionInt100 613 525 -14.4% 1.17x
SetUnionBox25 1040 895 -13.9% 1.16x
SetSymmetricDifferenceInt50 533 460 -13.7% 1.16x (?)
SetUnionInt0 605 527 -12.9% 1.15x (?)
SetUnion 6040 5280 -12.6% 1.14x (?)
SetSymmetricDifferenceInt0 773 681 -11.9% 1.14x (?)
DataToStringEmpty 850 750 -11.8% 1.13x (?)
SetExclusiveOr 7720 6820 -11.7% 1.13x
SetIntersectionInt50 387 343 -11.4% 1.13x
Set.isStrictSubset.Seq.Box0 6918 6141 -11.2% 1.13x (?)
Set.intersection.Seq.Int100 1660 1474 -11.2% 1.13x (?)
SetSymmetricDifferenceBox25 1415 1260 -11.0% 1.12x (?)
Set.isStrictSuperset.Seq.Box0 68500 61106 -10.8% 1.12x (?)
Set.isStrictSuperset.Seq.Box25 6927 6182 -10.8% 1.12x (?)
Set.isSubset.Seq.Box0 6879 6144 -10.7% 1.12x (?)
Set.isSubset.Seq.Box25 7391 6644 -10.1% 1.11x (?)
Set.intersection.Seq.Int50 1431 1287 -10.1% 1.11x (?)
StringFromLongWholeSubstring 10 9 -10.0% 1.11x
Set.isStrictSuperset.Seq.Int0 51813 46633 -10.0% 1.11x (?)
SetUnion_OfObjects 18020 16220 -10.0% 1.11x (?)
Set.isStrictSuperset.Seq.Int50 5186 4670 -9.9% 1.11x (?)
Set.isStrictSuperset.Seq.Int25 5190 4675 -9.9% 1.11x (?)
Set.isStrictSubset.Seq.Int0 5209 4698 -9.8% 1.11x (?)
Set.isSubset.Seq.Int0 5180 4675 -9.7% 1.11x (?)
Set.isStrictSubset.Seq.Box25 7355 6646 -9.6% 1.11x (?)
Set.intersection.Seq.Int25 1319 1192 -9.6% 1.11x (?)
Set.isSubset.Seq.Int25 5336 4829 -9.5% 1.10x (?)
Set.isStrictSubset.Seq.Int25 5357 4851 -9.4% 1.10x (?)
SetUnionBox0 1791 1622 -9.4% 1.10x (?)
SetIntersectionInt25 274 249 -9.1% 1.10x (?)
Set.isSubset.Seq.Int50 5480 4995 -8.9% 1.10x (?)
Set.intersection.Seq.Box25 2109 1926 -8.7% 1.10x (?)
Set.isSubset.Seq.Int100 5796 5303 -8.5% 1.09x (?)
Set.isStrictSubset.Seq.Int50 5481 5017 -8.5% 1.09x (?)
Set.isStrictSuperset.Seq.Int100 6217 5692 -8.4% 1.09x (?)
WordCountUniqueASCII 7950 7290 -8.3% 1.09x (?)
SetSymmetricDifferenceInt100 518 475 -8.3% 1.09x (?)
Set.isStrictSubset.Seq.Int100 6241 5725 -8.3% 1.09x (?)
StringHashing_zalgo 2425 2225 -8.2% 1.09x (?)
Set.intersection.Seq.Int0 1182 1085 -8.2% 1.09x (?)
Set.intersection.Seq.Box0 1773 1636 -7.7% 1.08x (?)
WordCountUniqueUTF16 8150 7540 -7.5% 1.08x (?)

Code size: -swiftlibs

Regression OLD NEW DELTA RATIO
libswiftSwiftReflectionTest.dylib 24576 28672 +16.7% 0.86x
How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac mini
  Model Identifier: Macmini8,1
  Processor Name: 6-Core Intel Core i7
  Processor Speed: 3.2 GHz
  Number of Processors: 1
  Total Number of Cores: 6
  L2 Cache (per Core): 256 KB
  L3 Cache: 12 MB
  Memory: 64 GB

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

Thanks, looks much better now!

I have a few more comments.

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

Thanks! The code changes lgtm.

Can you please take a look at the benchmark regressions?

@meg-gupta
Copy link
Contributor Author

meg-gupta commented Apr 9, 2020

@eeckstein I did not investigate each of the regressions. But the regressions from the benchmarks in CSVParsing.swift and ArrayAppend.swift come from an additional call to _swift_bridgeObjectRelease and _swift_bridgeObjectRetain in Sequence._copyContents. This happens because the changes here cause different inlining decisions and Sequence._copyContents has a call to Substring.UTF8View.subscript.getter instead of specialized Slice.subscript.getter. And so, the retain/release pair doesn't get optimized away. I think the regressions may also be compounded by the fact that the stubs for _swift_bridgeObjectRelease and _swift_bridgeObjectRetain are no longer 4-byte aligned in Benchmark_O binary.

@meg-gupta
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Apr 9, 2020

Build failed
Swift Test Linux Platform
Git Sha - bf4bc1bdbf688d0d1f7700819182a99ab4af860d

@swift-ci
Copy link
Contributor

swift-ci commented Apr 9, 2020

Build failed
Swift Test OS X Platform
Git Sha - bf4bc1bdbf688d0d1f7700819182a99ab4af860d

The PassManager should transform all functions in bottom up order.
This is necessary because when optimizations like inlining looks at the
callee function bodies to compute profitability, the callee functions
should have already undergone optimizations to get better profitability
estimates.

The PassManager builds its function worklist based on bottom up order
on initialization. However, newly created SILFunctions due to
specialization etc, are simply appended to the function worklist. This
can cause us to make bad inlining decisions due to inaccurate
profitability estimates. This change now updates the function worklist such
that, all the callees of the newly added SILFunction are proccessed
before it by the PassManager.

Fixes rdar://52202680
@meg-gupta
Copy link
Contributor Author

@swift-ci please test

@meg-gupta
Copy link
Contributor Author

@swift-ci please benchmark

@swift-ci
Copy link
Contributor

Performance: -O

Regression OLD NEW DELTA RATIO
CSVParsing.UTF8 29 67 +131.0% 0.43x
CSVParsing.UTF16 45 84 +86.7% 0.54x
ArrayAppendLatin1Substring 25308 47124 +86.2% 0.54x
ArrayAppendAsciiSubstring 24768 46080 +86.0% 0.54x
ArrayAppendUTF16Substring 24840 46080 +85.5% 0.54x
CharacterPropertiesPrecomputed 740 1110 +50.0% 0.67x
CSVParsingAltIndices2 759 1089 +43.5% 0.70x
UnicodeStringFromCodable 448 574 +28.1% 0.78x
CSVParsing.Scalar 177 221 +24.9% 0.80x
NormalizedIterator_ascii 111 138 +24.3% 0.80x
ObjectiveCBridgeStubFromNSDateRef 4310 5110 +18.6% 0.84x (?)
COWTree 3080 3640 +18.2% 0.85x
SortStringsUnicode 2575 3030 +17.7% 0.85x
MapReduce 307 359 +16.9% 0.86x
CharacterPropertiesStashed 950 1100 +15.8% 0.86x
StringComparison_latin1 560 640 +14.3% 0.88x
ObjectiveCBridgeStubFromNSDate 5560 6290 +13.1% 0.88x (?)
StringComparison_fastPrenormal 830 930 +12.0% 0.89x
CharacterPropertiesStashedMemo 1080 1210 +12.0% 0.89x
NormalizedIterator_latin1 320 358 +11.9% 0.89x
PrefixWhileAnySeqCRangeIter 280 312 +11.4% 0.90x
PrefixWhileAnySeqCntRange 280 312 +11.4% 0.90x
ArrayPlusEqualThreeElements 1530 1700 +11.1% 0.90x (?)
PrefixWhileSequence 281 312 +11.0% 0.90x
NormalizedIterator_fastPrenormal 960 1060 +10.4% 0.91x
COWArrayGuaranteedParameterOverhead 3150 3450 +9.5% 0.91x (?)
RemoveWhereSwapInts 53 58 +9.4% 0.91x
SuperChars2 434 472 +8.8% 0.92x (?)
FlattenListLoop 3667 3978 +8.5% 0.92x (?)
ArrayPlusEqualFiveElementCollection 6956 7511 +8.0% 0.93x (?)
Data.hash.Empty 64 69 +7.8% 0.93x
MapReduceAnyCollection 331 356 +7.6% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
SuffixAnySequence 1912 437 -77.1% 4.38x
DropLastAnySequence 1722 499 -71.0% 3.45x
SortIntPyramid 1165 575 -50.6% 2.03x
ArrayAppendSequence 910 550 -39.6% 1.65x
SortAdjacentIntPyramids 1405 885 -37.0% 1.59x
DropWhileSequence 25 20 -20.0% 1.25x
CharIteration_punctuatedJapanese_unicodeScalars 760 680 -10.5% 1.12x
String.replaceSubrange.String.Small 57 51 -10.5% 1.12x
StringHasSuffixAscii 2250 2020 -10.2% 1.11x
CharIndexing_punctuatedJapanese_unicodeScalars 1200 1080 -10.0% 1.11x
CharIteration_japanese_unicodeScalars 5240 4720 -9.9% 1.11x
CharIndexing_punctuated_unicodeScalars 1240 1120 -9.7% 1.11x (?)
Breadcrumbs.IdxToUTF16Range.longMixed 505 458 -9.3% 1.10x (?)
CharIteration_chinese_unicodeScalars 3080 2800 -9.1% 1.10x
StringHashing_zalgo 3150 2900 -7.9% 1.09x
ArrayAppendLazyMap 2420 2230 -7.9% 1.09x (?)
Breadcrumbs.IdxToUTF16.longMixed 919 847 -7.8% 1.09x (?)
NormalizedIterator_zalgo 3200 2950 -7.8% 1.08x
ParseFloat.Double.Exp 13 12 -7.7% 1.08x
StringHasPrefixAscii 1970 1820 -7.6% 1.08x
DevirtualizeProtocolComposition 205 190 -7.3% 1.08x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 1120 1040 -7.1% 1.08x

Code size: -O

Regression OLD NEW DELTA RATIO
COWTree.o 11636 21156 +81.8% 0.55x
ReduceInto.o 10932 13948 +27.6% 0.78x
DiffingMyers.o 6453 6973 +8.1% 0.93x
ArraySetElement.o 1240 1334 +7.6% 0.93x
COWArrayGuaranteedParameterOverhead.o 1315 1409 +7.1% 0.93x
Sim2DArray.o 1320 1414 +7.1% 0.93x
ArraySubscript.o 2874 3023 +5.2% 0.95x
Array2D.o 3012 3166 +5.1% 0.95x
Join.o 1615 1689 +4.6% 0.96x
MapReduce.o 27831 29023 +4.3% 0.96x
Memset.o 2215 2309 +4.2% 0.96x
BinaryFloatingPointProperties.o 5676 5914 +4.2% 0.96x
XorLoop.o 2132 2221 +4.2% 0.96x
StackPromo.o 2217 2305 +4.0% 0.96x
RangeOverlaps.o 6136 6374 +3.9% 0.96x
MonteCarloE.o 2804 2907 +3.7% 0.96x
ObserverClosure.o 2462 2550 +3.6% 0.97x
ArrayOfGenericRef.o 8966 9286 +3.6% 0.97x
ObserverPartiallyAppliedMethod.o 2509 2597 +3.5% 0.97x
CharacterProperties.o 22593 23385 +3.5% 0.97x
LazyFilter.o 8104 8384 +3.5% 0.97x
SortArrayInClass.o 2738 2832 +3.4% 0.97x
ArrayOfRef.o 9379 9699 +3.4% 0.97x
PopFrontGeneric.o 2744 2832 +3.2% 0.97x
ObserverForwarderStruct.o 2868 2956 +3.1% 0.97x
Phonebook.o 9159 9431 +3.0% 0.97x
ClassArrayGetter.o 3819 3923 +2.7% 0.97x
RangeAssignment.o 3276 3365 +2.7% 0.97x
Hanoi.o 3120 3204 +2.7% 0.97x
SortLettersInPlace.o 8517 8744 +2.7% 0.97x
NopDeinit.o 4007 4111 +2.6% 0.97x
Prims.o 12875 13187 +2.4% 0.98x
PrimsSplit.o 12927 13239 +2.4% 0.98x
RemoveWhere.o 16757 17157 +2.4% 0.98x
PopFront.o 3923 4011 +2.2% 0.98x
BucketSort.o 8451 8627 +2.1% 0.98x
ArrayInClass.o 4527 4621 +2.1% 0.98x
FlattenList.o 4346 4434 +2.0% 0.98x
StringWalk.o 40305 41009 +1.7% 0.98x
ObserverUnappliedMethod.o 5105 5193 +1.7% 0.98x
RandomTree.o 12375 12575 +1.6% 0.98x
RangeReplaceableCollectionPlusDefault.o 5668 5756 +1.6% 0.98x
ArrayAppend.o 25903 26295 +1.5% 0.99x
DictionaryGroup.o 12691 12883 +1.5% 0.99x
Combos.o 5070 5142 +1.4% 0.99x
CSVParsing.o 53412 54116 +1.3% 0.99x
StaticArray.o 11991 12144 +1.3% 0.99x
Walsh.o 7028 7116 +1.3% 0.99x
SequenceAlgos.o 21999 22271 +1.2% 0.99x
PrefixWhile.o 17734 17934 +1.1% 0.99x
DropWhile.o 17956 18156 +1.1% 0.99x
FindStringNaive.o 9587 9691 +1.1% 0.99x
Prefix.o 18448 18648 +1.1% 0.99x
NibbleSort.o 13288 13432 +1.1% 0.99x
PrimsNonStrongRef.o 120912 122160 +1.0% 0.99x
DropFirst.o 19788 19988 +1.0% 0.99x
 
Improvement OLD NEW DELTA RATIO
RandomShuffle.o 3632 3566 -1.8% 1.02x
ChainedFilterMap.o 3637 3581 -1.5% 1.02x
RC4.o 3975 3935 -1.0% 1.01x

Performance: -Osize

Regression OLD NEW DELTA RATIO
CSVParsing.UTF8 31 67 +116.1% 0.46x
ArrayAppendAsciiSubstring 25308 51516 +103.6% 0.49x
ArrayAppendLatin1Substring 25812 52488 +103.3% 0.49x
ArrayAppendUTF16Substring 25308 51444 +103.3% 0.49x
StrComplexWalk 2440 4640 +90.2% 0.53x
StringWalk 1320 2440 +84.8% 0.54x
CSVParsing.UTF16 46 84 +82.6% 0.55x
CharacterPropertiesPrecomputed 750 1130 +50.7% 0.66x
CSVParsingAltIndices2 880 1177 +33.7% 0.75x
UnicodeStringFromCodable 448 574 +28.1% 0.78x
NormalizedIterator_ascii 110 138 +25.5% 0.80x
CSVParsing.Scalar 178 221 +24.2% 0.81x
DropWhileAnySeqCntRange 146 177 +21.2% 0.82x
DropWhileAnySequenceLazy 1908 2221 +16.4% 0.86x (?)
SortStringsUnicode 2635 3060 +16.1% 0.86x
StringComparison_fastPrenormal 830 960 +15.7% 0.86x
StringComparison_latin1 568 648 +14.1% 0.88x
CharacterPropertiesStashed 960 1080 +12.5% 0.89x (?)
FindString.Rec3.String 193 215 +11.4% 0.90x
CharacterPropertiesStashedMemo 1150 1280 +11.3% 0.90x
NormalizedIterator_latin1 320 354 +10.6% 0.90x
ParseInt.UInt64.Hex 319 352 +10.3% 0.91x
DropFirstAnyCollection 148 163 +10.1% 0.91x
FindString.Rec3.Substring 227 250 +10.1% 0.91x
NormalizedIterator_fastPrenormal 970 1060 +9.3% 0.92x
FlattenListLoop 3586 3915 +9.2% 0.92x (?)
DropWhileAnyCollection 164 179 +9.1% 0.92x
ArrayPlusEqualFiveElementCollection 6845 7437 +8.6% 0.92x (?)
ArrayPlusEqualThreeElements 1670 1810 +8.4% 0.92x (?)
Data.hash.Empty 61 66 +8.2% 0.92x
DropLastAnySeqCntRange 622 670 +7.7% 0.93x
Set.subtracting.Empty.Box 13 14 +7.7% 0.93x (?)
SubstringEquatable 639 688 +7.7% 0.93x
 
Improvement OLD NEW DELTA RATIO
DropLastAnySequence 2052 631 -69.2% 3.25x
SuffixAnySequence 2120 824 -61.1% 2.57x
FlattenListFlatMap 5780 4908 -15.1% 1.18x (?)
String.replaceSubrange.String.Small 57 50 -12.3% 1.14x
ObjectiveCBridgeStubDateAccess 230 205 -10.9% 1.12x (?)
StringHasSuffixAscii 2150 1920 -10.7% 1.12x (?)
PrefixAnySeqCRangeIterLazy 158 142 -10.1% 1.11x
PrefixAnySeqCntRangeLazy 158 142 -10.1% 1.11x
PrefixWhileAnyCollectionLazy 158 143 -9.5% 1.10x
Breadcrumbs.IdxToUTF16Range.longMixed 507 459 -9.5% 1.10x
PrefixAnyCollection 163 148 -9.2% 1.10x
StringHasPrefixAscii 1870 1710 -8.6% 1.09x
StringHashing_zalgo 3150 2900 -7.9% 1.09x
NormalizedIterator_zalgo 3200 2950 -7.8% 1.08x
ParseFloat.Double.Exp 13 12 -7.7% 1.08x (?)
Breadcrumbs.IdxToUTF16.longMixed 919 851 -7.4% 1.08x (?)

Code size: -Osize

Regression OLD NEW DELTA RATIO
COWTree.o 11884 13572 +14.2% 0.88x
DiffingMyers.o 6701 7325 +9.3% 0.91x
Array2D.o 2742 2973 +8.4% 0.92x
ArraySetElement.o 1286 1381 +7.4% 0.93x
Sim2DArray.o 1350 1445 +7.0% 0.93x
COWArrayGuaranteedParameterOverhead.o 1393 1488 +6.8% 0.94x
ArraySubscript.o 2832 2974 +5.0% 0.95x
Join.o 1655 1736 +4.9% 0.95x
XorLoop.o 2042 2140 +4.8% 0.95x
Memset.o 1989 2084 +4.8% 0.95x
StackPromo.o 2193 2297 +4.7% 0.95x
BinaryFloatingPointProperties.o 5371 5609 +4.4% 0.96x
RangeOverlaps.o 5854 6102 +4.2% 0.96x
PopFrontGeneric.o 2768 2872 +3.8% 0.96x
ArrayOfGenericRef.o 9246 9582 +3.6% 0.96x
ArrayOfRef.o 9587 9923 +3.5% 0.97x
RangeAssignment.o 3202 3306 +3.2% 0.97x
ObserverClosure.o 2860 2950 +3.1% 0.97x
ObserverPartiallyAppliedMethod.o 2907 2997 +3.1% 0.97x
ObserverForwarderStruct.o 3008 3099 +3.0% 0.97x
MonteCarloE.o 2954 3041 +2.9% 0.97x
PopFront.o 3561 3659 +2.8% 0.97x
ClassArrayGetter.o 3818 3922 +2.7% 0.97x
FlattenList.o 3914 4018 +2.7% 0.97x
SortLettersInPlace.o 8260 8468 +2.5% 0.98x
Prims.o 12235 12523 +2.4% 0.98x
PrimsSplit.o 12287 12575 +2.3% 0.98x
Walsh.o 4458 4562 +2.3% 0.98x
BucketSort.o 8299 8491 +2.3% 0.98x
NopDeinit.o 4583 4687 +2.3% 0.98x
RangeReplaceableCollectionPlusDefault.o 4850 4954 +2.1% 0.98x
Hanoi.o 3296 3365 +2.1% 0.98x
CSVParsing.o 50092 51100 +2.0% 0.98x
ArrayInClass.o 4836 4931 +2.0% 0.98x
ObserverUnappliedMethod.o 5425 5529 +1.9% 0.98x
Phonebook.o 9247 9420 +1.9% 0.98x
Combos.o 5406 5494 +1.6% 0.98x
StaticArray.o 11093 11261 +1.5% 0.99x
DictionaryGroup.o 11131 11299 +1.5% 0.99x
PrimsNonStrongRef.o 102508 103892 +1.4% 0.99x
DictionarySubscriptDefault.o 17083 17267 +1.1% 0.99x
SortLargeExistentials.o 20446 20654 +1.0% 0.99x
 
Improvement OLD NEW DELTA RATIO
RomanNumbers.o 6814 6149 -9.8% 1.11x
SortArrayInClass.o 2958 2840 -4.0% 1.04x
RandomShuffle.o 3878 3749 -3.3% 1.03x
Histogram.o 2834 2760 -2.6% 1.03x
ChainedFilterMap.o 3597 3509 -2.4% 1.03x
ReversedCollections.o 8793 8585 -2.4% 1.02x
WordCount.o 37663 36799 -2.3% 1.02x
StringMatch.o 5154 5042 -2.2% 1.02x
Suffix.o 22371 21907 -2.1% 1.02x
TwoSum.o 3710 3636 -2.0% 1.02x
Substring.o 16545 16345 -1.2% 1.01x
Hash.o 20371 20126 -1.2% 1.01x
StringBuilder.o 8103 8007 -1.2% 1.01x
StringRemoveDupes.o 4827 4771 -1.2% 1.01x
Diffing.o 8611 8515 -1.1% 1.01x

Performance: -Onone

Regression OLD NEW DELTA RATIO
UnicodeStringFromCodable 460 593 +28.9% 0.78x
StrComplexWalk 6170 7070 +14.6% 0.87x
StringWalk 3840 4400 +14.6% 0.87x
SortStringsUnicode 3905 4350 +11.4% 0.90x
String.replaceSubrange.Substring 83 90 +8.4% 0.92x (?)
COWArrayGuaranteedParameterOverhead 7650 8250 +7.8% 0.93x (?)
NormalizedIterator_ascii 411 442 +7.5% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
DataToStringMedium 5800 5000 -13.8% 1.16x (?)
ObjectiveCBridgeStubToNSDate2 630 560 -11.1% 1.12x (?)
String.replaceSubrange.String.Small 59 53 -10.2% 1.11x (?)
DataToStringLargeUnicode 7250 6600 -9.0% 1.10x (?)
StringHashing_zalgo 3325 3050 -8.3% 1.09x (?)
NormalizedIterator_zalgo 3325 3075 -7.5% 1.08x
DataToStringEmpty 1400 1300 -7.1% 1.08x (?)
ExclusivityIndependent 88 82 -6.8% 1.07x (?)

Code size: -swiftlibs

Regression OLD NEW DELTA RATIO
libswiftSwiftReflectionTest.dylib 24576 28672 +16.7% 0.86x
libswiftStdlibUnittest.dylib 327680 331776 +1.2% 0.99x
How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

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

@meg-gupta
Copy link
Contributor Author

@swift-ci please test

@meg-gupta
Copy link
Contributor Author

@swift-ci Please Test Source Compatibility

@meg-gupta
Copy link
Contributor Author

@swift-ci benchmark

@swift-ci
Copy link
Contributor

Performance: -O

Regression OLD NEW DELTA RATIO
CSVParsing.UTF8 22 58 +163.6% 0.38x
CSVParsing.UTF16 35 73 +108.6% 0.48x
ArrayAppendRepeatCol 400 680 +70.0% 0.59x
CharacterPropertiesPrecomputed 540 860 +59.3% 0.63x
CSVParsingAltIndices2 594 924 +55.6% 0.64x
ArrayAppendUTF16Substring 22932 30708 +33.9% 0.75x
ArrayAppendAsciiSubstring 22968 30708 +33.7% 0.75x
ArrayAppendLatin1Substring 23472 31356 +33.6% 0.75x
CSVParsing.Scalar 136 174 +27.9% 0.78x
UnicodeStringFromCodable 323 412 +27.6% 0.78x (?)
EqualSubstringSubstring 22 28 +27.3% 0.79x
EqualSubstringSubstringGenericEquatable 22 28 +27.3% 0.79x
EqualStringSubstring 23 29 +26.1% 0.79x
NormalizedIterator_ascii 84 104 +23.8% 0.81x
LessSubstringSubstring 23 28 +21.7% 0.82x
EqualSubstringString 23 28 +21.7% 0.82x
LessSubstringSubstringGenericComparable 23 28 +21.7% 0.82x
COWTree 2400 2840 +18.3% 0.85x (?)
StringComparison_longSharedPrefix 321 372 +15.9% 0.86x
SortStringsUnicode 2135 2420 +13.3% 0.88x
NopDeinit 8800 9900 +12.5% 0.89x (?)
ArrayPlusEqualThreeElements 1260 1410 +11.9% 0.89x (?)
StringComparison_latin1 448 500 +11.6% 0.90x
StringComparison_fastPrenormal 690 770 +11.6% 0.90x (?)
CharacterPropertiesStashedMemo 800 880 +10.0% 0.91x (?)
COWArrayGuaranteedParameterOverhead 2600 2850 +9.6% 0.91x (?)
FilterEvenUsingReduceInto 104 114 +9.6% 0.91x (?)
DataCreateMediumArray 1940 2100 +8.2% 0.92x (?)
CharacterPropertiesStashed 740 800 +8.1% 0.93x (?)
CharIteration_utf16_unicodeScalars 3000 3240 +8.0% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
SuffixAnySequence 1742 255 -85.4% 6.83x
DropLastAnySequence 1482 353 -76.2% 4.20x
ArrayAppendSequence 670 370 -44.8% 1.81x (?)
SortIntPyramid 725 450 -37.9% 1.61x
SortAdjacentIntPyramids 925 655 -29.2% 1.41x (?)
FlattenListFlatMap 5137 4261 -17.1% 1.21x (?)
StringHasSuffixAscii 1460 1240 -15.1% 1.18x
IterateData 943 804 -14.7% 1.17x (?)
ObjectiveCBridgeStubDateAccess 152 130 -14.5% 1.17x (?)
UTF8Decode_InitFromCustom_contiguous 163 142 -12.9% 1.15x (?)
UTF8Decode_InitDecoding 163 143 -12.3% 1.14x (?)
StringHasPrefixAscii 1370 1220 -10.9% 1.12x (?)
Dictionary3 153 137 -10.5% 1.12x
AngryPhonebook 273 245 -10.3% 1.11x (?)
DataSubscriptMedium 41 37 -9.8% 1.11x (?)
BucketSort 152 138 -9.2% 1.10x (?)
CharIndexing_punctuated_unicodeScalars 880 800 -9.1% 1.10x (?)
CharIndexing_punctuatedJapanese_unicodeScalars 880 800 -9.1% 1.10x
AngryPhonebook.ASCII2.Small 123 112 -8.9% 1.10x (?)
StringHashing_zalgo 2300 2100 -8.7% 1.10x (?)
SubstringEqualString 278 256 -7.9% 1.09x (?)
AngryPhonebook.Strasse 142 131 -7.7% 1.08x (?)
NormalizedIterator_zalgo 2325 2150 -7.5% 1.08x (?)
CharIteration_punctuatedJapanese_unicodeScalars 560 520 -7.1% 1.08x (?)
ObjectiveCBridgeStubToNSDateRef 2320 2160 -6.9% 1.07x (?)
UTF8Decode_InitFromCustom_noncontiguous 328 306 -6.7% 1.07x (?)

Code size: -O

Regression OLD NEW DELTA RATIO
COWTree.o 11444 20948 +83.0% 0.55x
ArraySetElement.o 1240 1334 +7.6% 0.93x
COWArrayGuaranteedParameterOverhead.o 1315 1409 +7.1% 0.93x
Sim2DArray.o 1320 1414 +7.1% 0.93x
DiffingMyers.o 6453 6837 +6.0% 0.94x
ArraySubscript.o 2874 3023 +5.2% 0.95x
Array2D.o 3012 3166 +5.1% 0.95x
Join.o 1615 1689 +4.6% 0.96x
Memset.o 2215 2309 +4.2% 0.96x
BinaryFloatingPointProperties.o 5676 5914 +4.2% 0.96x
XorLoop.o 2132 2221 +4.2% 0.96x
ArrayOfGenericRef.o 8678 9030 +4.1% 0.96x
StackPromo.o 2217 2305 +4.0% 0.96x
ArrayOfRef.o 9075 9427 +3.9% 0.96x
RangeOverlaps.o 6136 6374 +3.9% 0.96x
MonteCarloE.o 2804 2907 +3.7% 0.96x
ObserverClosure.o 2462 2550 +3.6% 0.97x
CharacterProperties.o 22561 23353 +3.5% 0.97x
ObserverPartiallyAppliedMethod.o 2509 2597 +3.5% 0.97x
SortArrayInClass.o 2738 2832 +3.4% 0.97x
ClassArrayGetter.o 3659 3779 +3.3% 0.97x
PopFrontGeneric.o 2744 2832 +3.2% 0.97x
NopDeinit.o 3847 3967 +3.1% 0.97x
ObserverForwarderStruct.o 2868 2956 +3.1% 0.97x
SortLettersInPlace.o 8501 8744 +2.9% 0.97x
RangeAssignment.o 3276 3365 +2.7% 0.97x
Hanoi.o 3120 3204 +2.7% 0.97x
RC4.o 3975 4079 +2.6% 0.97x
RandomShuffle.o 3632 3726 +2.6% 0.97x
Prims.o 12907 13219 +2.4% 0.98x
PrimsSplit.o 12959 13271 +2.4% 0.98x
PopFront.o 3923 4011 +2.2% 0.98x
SortIntPyramids.o 8973 9165 +2.1% 0.98x
BucketSort.o 8451 8627 +2.1% 0.98x
ArrayInClass.o 4527 4621 +2.1% 0.98x
FlattenList.o 4346 4434 +2.0% 0.98x
ReversedCollections.o 9270 9446 +1.9% 0.98x
RemoveWhere.o 16091 16395 +1.9% 0.98x
Phonebook.o 9175 9335 +1.7% 0.98x
ObserverUnappliedMethod.o 5105 5193 +1.7% 0.98x
DictionaryGroup.o 12291 12499 +1.7% 0.98x
RangeReplaceableCollectionPlusDefault.o 5668 5756 +1.6% 0.98x
ArrayAppend.o 25903 26279 +1.5% 0.99x
Combos.o 5070 5142 +1.4% 0.99x
Walsh.o 7028 7116 +1.3% 0.99x
CSVParsing.o 53132 53756 +1.2% 0.99x
Breadcrumbs.o 37447 37871 +1.1% 0.99x
ReduceInto.o 10932 11052 +1.1% 0.99x
FindStringNaive.o 9635 9739 +1.1% 0.99x
DictionarySubscriptDefault.o 19683 19891 +1.1% 0.99x
PrimsNonStrongRef.o 125520 126832 +1.0% 0.99x
 
Improvement OLD NEW DELTA RATIO
Suffix.o 23853 23493 -1.5% 1.02x

Performance: -Osize

Regression OLD NEW DELTA RATIO
SuffixArrayLazy 4 9 +125.0% 0.44x
CSVParsing.UTF8 27 54 +100.0% 0.50x
CSVParsing.UTF16 38 72 +89.5% 0.53x
StringWalk 920 1520 +65.2% 0.61x
CharacterPropertiesPrecomputed 560 870 +55.4% 0.64x
SuffixCountableRangeLazy 4 6 +50.0% 0.67x (?)
PrefixWhileAnySeqCRangeIterLazy 81 121 +49.4% 0.67x
PrefixWhileAnySeqCntRangeLazy 81 121 +49.4% 0.67x
PrefixWhileAnyCollection 99 147 +48.5% 0.67x
CSVParsingAltIndices2 671 968 +44.3% 0.69x
PrefixWhileAnyCollectionLazy 94 135 +43.6% 0.70x
StrComplexWalk 1930 2740 +42.0% 0.70x
ArrayAppendLatin1Substring 21600 30528 +41.3% 0.71x
ArrayAppendUTF16Substring 21204 29880 +40.9% 0.71x
ArrayAppendAsciiSubstring 21204 29880 +40.9% 0.71x
DropWhileArray 27 38 +40.7% 0.71x
DropWhileAnyCollectionLazy 131 171 +30.5% 0.77x
DropFirstAnySeqCRangeIterLazy 111 143 +28.8% 0.78x
DropFirstAnySeqCntRangeLazy 111 143 +28.8% 0.78x (?)
NormalizedIterator_ascii 80 103 +28.7% 0.78x
UnicodeStringFromCodable 322 413 +28.3% 0.78x
CSVParsing.Scalar 136 174 +27.9% 0.78x
EqualSubstringSubstring 22 28 +27.3% 0.79x
EqualSubstringSubstringGenericEquatable 22 28 +27.3% 0.79x
EqualSubstringString 22 28 +27.3% 0.79x (?)
LessSubstringSubstring 23 28 +21.7% 0.82x
EqualStringSubstring 23 28 +21.7% 0.82x
LessSubstringSubstringGenericComparable 23 28 +21.7% 0.82x (?)
DropWhileAnyCollection 108 126 +16.7% 0.86x
StringComparison_longSharedPrefix 322 375 +16.5% 0.86x (?)
CharIndexing_ascii_unicodeScalars 3280 3800 +15.9% 0.86x
MapReduce 218 251 +15.1% 0.87x
DropFirstAnyCollection 99 113 +14.1% 0.88x
DropLastAnyCollection 36 41 +13.9% 0.88x (?)
CharIndexing_tweet_unicodeScalars 6640 7480 +12.7% 0.89x (?)
StringComparison_latin1 444 500 +12.6% 0.89x (?)
SortStringsUnicode 2130 2395 +12.4% 0.89x (?)
PrefixAnySeqCRangeIterLazy 108 121 +12.0% 0.89x
PrefixAnySeqCntRangeLazy 108 121 +12.0% 0.89x (?)
FindString.Rec3.String 161 180 +11.8% 0.89x (?)
StringComparison_fastPrenormal 690 770 +11.6% 0.90x (?)
SequenceAlgosArray 1960 2180 +11.2% 0.90x (?)
ArrayPlusEqualFiveElementCollection 4403 4884 +10.9% 0.90x (?)
Array2D 4224 4624 +9.5% 0.91x (?)
COWArrayGuaranteedParameterOverhead 2650 2900 +9.4% 0.91x (?)
FindString.Rec3.Substring 194 211 +8.8% 0.92x
DropWhileArrayLazy 49 53 +8.2% 0.92x (?)
ArrayPlusEqualThreeElements 1350 1460 +8.1% 0.92x (?)
ArraySetElement 262 283 +8.0% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
DropLastAnySequence 1765 467 -73.5% 3.78x
SuffixAnySequence 1917 697 -63.6% 2.75x
SuffixArray 9 4 -55.5% 2.25x
DropLastArray 9 5 -44.4% 1.80x
ArrayAppendRepeatCol 850 500 -41.2% 1.70x (?)
PrefixWhileArrayLazy 40 26 -35.0% 1.54x
PrefixWhileSequenceLazy 40 26 -35.0% 1.54x
Dictionary4 211 158 -25.1% 1.34x
CharIteration_punctuatedJapanese_unicodeScalars 640 480 -25.0% 1.33x
DropWhileAnySeqCntRange 128 96 -25.0% 1.33x (?)
CharIteration_chinese_unicodeScalars 2640 2000 -24.2% 1.32x
CharIteration_japanese_unicodeScalars 4480 3400 -24.1% 1.32x
PrefixWhileCountableRangeLazy 26 20 -23.1% 1.30x
Dictionary4OfObjects 283 226 -20.1% 1.25x
CharIteration_russian_unicodeScalars 3000 2400 -20.0% 1.25x
CharIteration_punctuated_unicodeScalars 600 480 -20.0% 1.25x (?)
DropWhileAnySeqCRangeIter 136 109 -19.9% 1.25x (?)
CharIteration_korean_unicodeScalars 3360 2720 -19.0% 1.24x
DropWhileSequenceLazy 76 62 -18.4% 1.23x
CharIteration_tweet_unicodeScalars 4840 4000 -17.4% 1.21x
CharIteration_ascii_unicodeScalars 2440 2040 -16.4% 1.20x
StringHasPrefixAscii 1310 1100 -16.0% 1.19x
StringHasSuffixAscii 1450 1230 -15.2% 1.18x
UTF8Decode_InitFromCustom_contiguous 164 143 -12.8% 1.15x (?)
UTF8Decode_InitDecoding 162 143 -11.7% 1.13x (?)
NopDeinit 9900 8800 -11.1% 1.12x
AngryPhonebook 280 252 -10.0% 1.11x (?)
SubstringEqualString 283 257 -9.2% 1.10x (?)
AngryPhonebook.ASCII2.Small 123 112 -8.9% 1.10x (?)
StringHashing_zalgo 2300 2100 -8.7% 1.10x (?)
StringMatch 5900 5400 -8.5% 1.09x (?)
AngryPhonebook.Strasse 142 131 -7.7% 1.08x (?)
NormalizedIterator_zalgo 2300 2125 -7.6% 1.08x (?)

Code size: -Osize

Regression OLD NEW DELTA RATIO
COWTree.o 11288 12976 +15.0% 0.87x
DiffingMyers.o 6589 7055 +7.1% 0.93x
ArraySetElement.o 1237 1319 +6.6% 0.94x
Sim2DArray.o 1333 1415 +6.2% 0.94x
COWArrayGuaranteedParameterOverhead.o 1335 1417 +6.1% 0.94x
Join.o 1618 1696 +4.8% 0.95x
Array2D.o 2673 2792 +4.5% 0.96x
ArraySubscript.o 2793 2911 +4.2% 0.96x
Memset.o 1946 2028 +4.2% 0.96x
StackPromo.o 2129 2217 +4.1% 0.96x
BinaryFloatingPointProperties.o 5280 5479 +3.8% 0.96x
XorLoop.o 2022 2097 +3.7% 0.96x
ArrayOfGenericRef.o 8496 8800 +3.6% 0.97x
RangeOverlaps.o 5698 5897 +3.5% 0.97x
ArrayOfRef.o 8773 9077 +3.5% 0.97x
PopFrontGeneric.o 2709 2797 +3.2% 0.97x
SortArrayInClass.o 2842 2930 +3.1% 0.97x
ObserverClosure.o 2729 2812 +3.0% 0.97x
ClassArrayGetter.o 3504 3609 +3.0% 0.97x
ObserverPartiallyAppliedMethod.o 2776 2859 +3.0% 0.97x
RangeAssignment.o 3166 3254 +2.8% 0.97x
MonteCarloE.o 2902 2982 +2.8% 0.97x
ObserverForwarderStruct.o 2928 3003 +2.6% 0.98x
NopDeinit.o 4199 4303 +2.5% 0.98x
PopFront.o 3503 3584 +2.3% 0.98x
SortLettersInPlace.o 8128 8315 +2.3% 0.98x
RandomShuffle.o 3740 3822 +2.2% 0.98x
FlattenList.o 3824 3906 +2.1% 0.98x
Hanoi.o 3141 3207 +2.1% 0.98x
RC4.o 3441 3513 +2.1% 0.98x
BucketSort.o 8075 8235 +2.0% 0.98x
PrimsSplit.o 11840 12067 +1.9% 0.98x
RemoveWhere.o 15060 15343 +1.9% 0.98x
Prims.o 11788 11999 +1.8% 0.98x
ArrayInClass.o 4640 4722 +1.8% 0.98x
RangeReplaceableCollectionPlusDefault.o 4761 4843 +1.7% 0.98x
Phonebook.o 8956 9104 +1.7% 0.98x
Walsh.o 4390 4462 +1.6% 0.98x
Combos.o 5274 5356 +1.6% 0.98x
SortIntPyramids.o 8918 9049 +1.5% 0.99x
ObserverUnappliedMethod.o 5233 5305 +1.4% 0.99x
NibbleSort.o 12156 12316 +1.3% 0.99x
DictionaryGroup.o 10683 10819 +1.3% 0.99x
PrimsNonStrongRef.o 98238 99366 +1.1% 0.99x
 
Improvement OLD NEW DELTA RATIO
RomanNumbers.o 6723 6082 -9.5% 1.11x
Histogram.o 2760 2688 -2.6% 1.03x
WordCount.o 37043 36106 -2.5% 1.03x
TwoSum.o 3646 3561 -2.3% 1.02x
StringMatch.o 5106 4994 -2.2% 1.02x
Suffix.o 22052 21657 -1.8% 1.02x
Hash.o 20025 19745 -1.4% 1.01x
StringBuilder.o 7902 7805 -1.2% 1.01x
StringRemoveDupes.o 4575 4519 -1.2% 1.01x
FindStringNaive.o 9097 8987 -1.2% 1.01x
Substring.o 16245 16058 -1.2% 1.01x

Performance: -Onone

Regression OLD NEW DELTA RATIO
UnicodeStringFromCodable 332 422 +27.1% 0.79x (?)
LessSubstringSubstring 27 33 +22.2% 0.82x (?)
EqualSubstringSubstringGenericEquatable 27 32 +18.5% 0.84x
LessSubstringSubstringGenericComparable 27 32 +18.5% 0.84x (?)
EqualStringSubstring 28 33 +17.9% 0.85x (?)
EqualSubstringString 28 33 +17.9% 0.85x
EqualSubstringSubstring 28 32 +14.3% 0.88x
StringWalk 2920 3240 +11.0% 0.90x (?)
ArrayAppend 2700 2980 +10.4% 0.91x (?)
SortStringsUnicode 3040 3340 +9.9% 0.91x (?)
ArrayAppendUTF16 8602 9418 +9.5% 0.91x (?)
ArrayAppendLatin1 8636 9418 +9.1% 0.92x (?)
COWArrayGuaranteedParameterOverhead 6100 6650 +9.0% 0.92x (?)
ArrayAppendAscii 8636 9384 +8.7% 0.92x (?)
NormalizedIterator_fastPrenormal 970 1050 +8.2% 0.92x (?)
 
Improvement OLD NEW DELTA RATIO
UTF8Decode_InitFromCustom_contiguous 174 154 -11.5% 1.13x (?)
UTF8Decode_InitDecoding 171 152 -11.1% 1.12x (?)
StringFromLongWholeSubstring 10 9 -10.0% 1.11x
StringHashing_zalgo 2400 2200 -8.3% 1.09x (?)
ObjectiveCBridgeStubToNSDateRef 2720 2500 -8.1% 1.09x (?)
AngryPhonebook.Strasse 142 131 -7.7% 1.08x (?)
ObjectiveCBridgeStubToNSDate2 410 380 -7.3% 1.08x (?)
String.replaceSubrange.Substring 61 57 -6.6% 1.07x (?)

Code size: -swiftlibs

Regression OLD NEW DELTA RATIO
libswiftSwiftReflectionTest.dylib 24576 28672 +16.7% 0.86x
How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac mini
  Model Identifier: Macmini8,1
  Processor Name: 6-Core Intel Core i7
  Processor Speed: 3.2 GHz
  Number of Processors: 1
  Total Number of Cores: 6
  L2 Cache (per Core): 256 KB
  L3 Cache: 12 MB
  Memory: 64 GB

@meg-gupta
Copy link
Contributor Author

@swift-ci Please Test Source Compatibility

@meg-gupta
Copy link
Contributor Author

@swift-ci Please Test Source Compatibility Debug

@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta meg-gupta merged commit a1e281d into swiftlang:master Jun 3, 2020
texasmichelle added a commit that referenced this pull request Nov 3, 2020
Reverts the reversion in #34188.

Bisection points to #34188 as the cause of a crasher that looks to be the
result of a miscompile. Adding this back resolves the crasher.

Details of the crash:
The `DiscontiguousSliceSlicing` test in
validation-test/StdlibUnittest/RangeSet.swift crashes in the `every()`
function on line 15. When the contents of this function are replaced with a
functional equivalent that uses different syntax, the crash resolves.
ainu-bot added a commit to google/swift that referenced this pull request Nov 3, 2020
…tage

* 'tensorflow' of github.com:apple/swift:
  Re-add swiftlang#30710
  Set SWIFTCI_USE_LOCAL_DEPS=1
  update-checkout-config.json: adjust for tensorflow merge
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