Skip to content

[ownership] Move ownership lowering after serialization on stdlibCore. #35872

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 11 commits into from
Feb 13, 2021

Conversation

gottesmm
Copy link
Contributor

Title says it all. This has a few small PRs to fix issues that I found. I am probably going to test and then rebase.

@gottesmm gottesmm requested a review from atrick February 10, 2021 06:13
@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm
Copy link
Contributor Author

@swift-ci benchmark

@gottesmm
Copy link
Contributor Author

@swift-ci test source compatibility

@gottesmm gottesmm requested a review from meg-gupta February 10, 2021 06:14
@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 33db0a9f0a444ff1f8617173579fdc1714dfb51e

@gottesmm
Copy link
Contributor Author

Funny story, the test failure is actually a test that had the regex setup to only pattern match a register up to %9 (that is it wouldn't pattern match %10). I fixed the test so we can do the pattern match appropriately now.

@gottesmm
Copy link
Contributor Author

I am going to wait for the benchmarks to run then I am going to do another push with the fix/redo the test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 33db0a9f0a444ff1f8617173579fdc1714dfb51e

@swift-ci
Copy link
Contributor

Performance: -O

Regression OLD NEW DELTA RATIO
Breadcrumbs.MutatedUTF16ToIdx.Mixed 287 1249 +335.2% 0.23x
Breadcrumbs.MutatedIdxToUTF16.Mixed 306 1255 +310.1% 0.24x
NSStringConversion.Long 994 2137 +115.0% 0.47x
NSStringConversion.Medium 440 897 +103.9% 0.49x
StringWordBuilderReservingCapacity 2130 3020 +41.8% 0.71x
StringWordBuilder 2180 3060 +40.4% 0.71x
NSStringConversion.MutableCopy.Long 803 1116 +39.0% 0.72x
NSStringConversion.UTF8 779 1046 +34.3% 0.74x
RemoveWhereFilterString 291 388 +33.3% 0.75x
Data.init.Sequence.64kB.Count.RE.I 3 4 +33.3% 0.75x (?)
AngryPhonebook.Strasse 170 222 +30.6% 0.77x
AngryPhonebook.ASCII2.Small 159 205 +28.9% 0.78x
AngryPhonebook 350 448 +28.0% 0.78x
Join 209 265 +26.8% 0.79x
NSStringConversion.MutableCopy.Medium 778 979 +25.8% 0.79x (?)
UnicodeStringFromCodable 493 620 +25.8% 0.80x
AngryPhonebook.Armenian 196 246 +25.5% 0.80x
NSStringConversion.Rebridge.UTF8 436 546 +25.2% 0.80x (?)
NSStringConversion.Rebridge.LongUTF8 52 65 +25.0% 0.80x (?)
AngryPhonebook.Cyrillic 213 265 +24.4% 0.80x
ConvertFloatingPoint.MockFloat64ToInt64 751 915 +21.8% 0.82x
StringMatch 6200 7500 +21.0% 0.83x
String.replaceSubrange.Substring 88 106 +20.5% 0.83x
DictionaryBridgeToObjC_Bridge 16 19 +18.7% 0.84x (?)
ArrayAppendLatin1Substring 16164 19116 +18.3% 0.85x
ArrayAppendUTF16Substring 15912 18756 +17.9% 0.85x
ArrayAppendAsciiSubstring 15912 18756 +17.9% 0.85x (?)
StringHasSuffixAscii 2310 2710 +17.3% 0.85x
FindString.Loop1.Substring 496 570 +14.9% 0.87x
RemoveWhereQuadraticString 284 325 +14.4% 0.87x
ParseInt.UInt64.Decimal 200 228 +14.0% 0.88x
Set.isDisjoint.Seq.Int.Empty 72 82 +13.9% 0.88x
NSStringConversion.Rebridge.Medium 167 190 +13.8% 0.88x (?)
NSStringConversion.Rebridge.Long 167 190 +13.8% 0.88x (?)
ObjectiveCBridgeStringIsEqual2 315 357 +13.3% 0.88x (?)
StringSwitch 497 563 +13.3% 0.88x (?)
FindString.Rec3.Substring 190 215 +13.2% 0.88x (?)
SubstringEqualString 398 450 +13.1% 0.88x
ObjectiveCBridgeStubFromNSString 862 973 +12.9% 0.89x (?)
StringHasPrefixAscii 2140 2400 +12.1% 0.89x
String.replaceSubrange.Substring.Small 75 84 +12.0% 0.89x
FlattenListFlatMap 6051 6768 +11.8% 0.89x (?)
CharIteration_punctuatedJapanese_unicodeScalars 720 800 +11.1% 0.90x
StringHashing_latin1 288 320 +11.1% 0.90x
StringHashing_fastPrenormal 840 930 +10.7% 0.90x (?)
DictionarySwap 1000 1104 +10.4% 0.91x (?)
FindString.Rec3.String 174 192 +10.3% 0.91x
CSVParsing.UTF16 49 54 +10.2% 0.91x (?)
String.replaceSubrange.ArrChar.Small 69 76 +10.1% 0.91x
FloatingPointPrinting_Float_description_small 4428 4860 +9.8% 0.91x (?)
LuhnAlgoEager 228 250 +9.6% 0.91x (?)
NSArray.bridged.mutableCopy.objectAtIndex 1009 1103 +9.3% 0.91x (?)
FloatingPointPrinting_Float_description_uniform 4500 4900 +8.9% 0.92x (?)
CharIteration_japanese_unicodeScalars 5000 5440 +8.8% 0.92x
CharIteration_korean_unicodeScalars 3640 3960 +8.8% 0.92x
RomanNumbers2 590 641 +8.6% 0.92x
DataSetCountSmall 142 154 +8.5% 0.92x (?)
ParseInt.UInt64.Hex 326 353 +8.3% 0.92x
CharIteration_chinese_unicodeScalars 2960 3200 +8.1% 0.93x (?)
String.replaceSubrange.String.Small 62 67 +8.1% 0.93x
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 74500 80500 +8.1% 0.93x (?)
AngryPhonebook.Strasse.Small 938 1013 +8.0% 0.93x (?)
String.data.Empty 39 42 +7.7% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
Breadcrumbs.CopyUTF16CodeUnits.ASCII 28 20 -28.6% 1.40x
UTF8Decode_InitDecoding 251 193 -23.1% 1.30x
UTF8Decode_InitFromCustom_contiguous 256 198 -22.7% 1.29x
UTF8Decode_InitFromData 246 195 -20.7% 1.26x
UTF8Decode_InitFromBytes 253 202 -20.2% 1.25x
StringFromLongWholeSubstringGeneric 6 5 -16.7% 1.20x
UTF8Decode_InitFromCustom_noncontiguous 458 398 -13.1% 1.15x
ArrayAppendAscii 3672 3264 -11.1% 1.12x (?)
ArrayAppendUTF16 3672 3264 -11.1% 1.12x (?)
Diffing.Same 9 8 -11.1% 1.12x (?)
ArrayAppendLatin1 3740 3366 -10.0% 1.11x (?)
UTF8Decode_InitFromCustom_contiguous_ascii 307 277 -9.8% 1.11x (?)
ArrayPlusEqualThreeElements 1660 1520 -8.4% 1.09x (?)
DictionaryKeysContainsCocoa 36 33 -8.3% 1.09x (?)
DataToStringLargeUnicode 7000 6450 -7.9% 1.09x (?)
TypeName 1183 1091 -7.8% 1.08x (?)
CharIndexing_tweet_unicodeScalars_Backwards 10040 9320 -7.2% 1.08x (?)
COWArrayGuaranteedParameterOverhead 3500 3250 -7.1% 1.08x (?)
CharIndexing_tweet_unicodeScalars 10400 9680 -6.9% 1.07x
CharIndexing_ascii_unicodeScalars 5240 4880 -6.9% 1.07x (?)
CharIndexing_punctuated_unicodeScalars 1200 1120 -6.7% 1.07x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 1200 1120 -6.7% 1.07x (?)

Code size: -O

Regression OLD NEW DELTA RATIO
RomanNumbers.o 5830 6950 +19.2% 0.84x
IntegerParsing.o 56197 60565 +7.8% 0.93x
CSVParsing.o 56539 59883 +5.9% 0.94x
SortIntPyramids.o 8976 9216 +2.7% 0.97x
RangeOverlaps.o 6110 6270 +2.6% 0.97x
ArraySetElement.o 1288 1311 +1.8% 0.98x
COWArrayGuaranteedParameterOverhead.o 1363 1386 +1.7% 0.98x
Sim2DArray.o 1368 1391 +1.7% 0.98x
SequenceAlgos.o 21020 21284 +1.3% 0.99x
DiffingMyers.o 6685 6765 +1.2% 0.99x
StringMatch.o 4202 4250 +1.1% 0.99x
Memset.o 2207 2230 +1.0% 0.99x
Histogram.o 3032 3063 +1.0% 0.99x
 
Improvement OLD NEW DELTA RATIO
RangeReplaceableCollectionPlusDefault.o 5396 4846 -10.2% 1.11x
StrToInt.o 3553 3214 -9.5% 1.11x
StringBuilder.o 7873 7505 -4.7% 1.05x
DictionaryCompactMapValues.o 14197 13757 -3.1% 1.03x
DriverUtils.o 128943 124999 -3.1% 1.03x
LuhnAlgoEager.o 12774 12494 -2.2% 1.02x
LuhnAlgoLazy.o 12774 12494 -2.2% 1.02x
Combos.o 6022 5902 -2.0% 1.02x
FindStringNaive.o 8899 8739 -1.8% 1.02x
DictionarySwap.o 18137 17817 -1.8% 1.02x
ClassArrayGetter.o 3456 3408 -1.4% 1.01x
LazyFilter.o 8080 7984 -1.2% 1.01x
MonteCarloE.o 2833 2801 -1.1% 1.01x
Substring.o 19128 18920 -1.1% 1.01x

Performance: -Osize

Regression OLD NEW DELTA RATIO
Breadcrumbs.MutatedUTF16ToIdx.Mixed 294 1248 +324.5% 0.24x
Breadcrumbs.MutatedIdxToUTF16.Mixed 300 1254 +318.0% 0.24x
SuffixAnySequence 802 2584 +222.2% 0.31x
SuffixSequenceLazy 802 2550 +218.0% 0.31x
SuffixSequence 802 2400 +199.3% 0.33x
NSStringConversion.Long 1018 2150 +111.2% 0.47x
NSStringConversion.Medium 450 907 +101.6% 0.50x
Dict.CopyKeyValue.28k 1937 3380 +74.5% 0.57x
Dict.CopyKeyValue.16k 1003 1745 +74.0% 0.57x
Dict.CopyKeyValue.20k 1115 1912 +71.5% 0.58x
Dict.CopyKeyValue.24k 1250 2123 +69.8% 0.59x
NSStringConversion.UTF8 797 1183 +48.4% 0.67x
StringWordBuilderReservingCapacity 2130 3010 +41.3% 0.71x
StringWordBuilder 2180 3060 +40.4% 0.71x
NSStringConversion.MutableCopy.Long 784 1062 +35.5% 0.74x
RemoveWhereFilterString 285 382 +34.0% 0.75x (?)
DropFirstSequence 58 76 +31.0% 0.76x
DropFirstSequenceLazy 58 76 +31.0% 0.76x
TwoSum 1174 1534 +30.7% 0.77x
AngryPhonebook.Strasse 171 222 +29.8% 0.77x
AngryPhonebook.ASCII2.Small 159 204 +28.3% 0.78x
NSStringConversion.MutableCopy.Medium 782 1003 +28.3% 0.78x
AngryPhonebook 350 448 +28.0% 0.78x
StringMatch 6500 8300 +27.7% 0.78x
FrequenciesUsingReduceInto 820 1040 +26.8% 0.79x
Join 209 265 +26.8% 0.79x
UnicodeStringFromCodable 493 619 +25.6% 0.80x
AngryPhonebook.Armenian 196 246 +25.5% 0.80x
AngryPhonebook.Cyrillic 212 265 +25.0% 0.80x
RGBHistogram 2240 2780 +24.1% 0.81x
NSStringConversion.Rebridge.UTF8 442 543 +22.9% 0.81x (?)
UTF8Decode_InitFromData_ascii_as_ascii 619 760 +22.8% 0.81x (?)
NSStringConversion.Rebridge.LongUTF8 53 65 +22.6% 0.82x (?)
DropFirstAnyCollection 164 200 +22.0% 0.82x
ParseInt.UIntSmall.Binary 706 849 +20.3% 0.83x
String.replaceSubrange.Substring 88 105 +19.3% 0.84x
DictionaryBridgeToObjC_Bridge 16 19 +18.7% 0.84x (?)
FindString.Loop1.Substring 481 570 +18.5% 0.84x
StringHasSuffixAscii 2170 2570 +18.4% 0.84x
RomanNumbers2 570 675 +18.4% 0.84x
ObjectiveCBridgeFromNSString 1185 1375 +16.0% 0.86x (?)
SuffixAnySeqCRangeIter 804 931 +15.8% 0.86x
RemoveWhereQuadraticString 288 332 +15.3% 0.87x
Dictionary2 860 985 +14.5% 0.87x (?)
StringHasPrefixAscii 2020 2310 +14.4% 0.87x (?)
StringUTF16SubstringBuilder 3480 3960 +13.8% 0.88x (?)
SuffixAnySeqCntRange 754 854 +13.3% 0.88x
Dictionary 495 560 +13.1% 0.88x
String.replaceSubrange.Substring.Small 75 84 +12.0% 0.89x
StringSwitch 503 563 +11.9% 0.89x
DropLastAnyCollection 59 66 +11.9% 0.89x
FindString.Rec3.String 174 194 +11.5% 0.90x
SubstringEqualString 402 448 +11.4% 0.90x
ObjectiveCBridgeStringIsEqual2 317 353 +11.4% 0.90x
Histogram 485 540 +11.3% 0.90x
StringHashing_latin1 288 320 +11.1% 0.90x
Prims 950 1055 +11.1% 0.90x (?)
DropWhileAnySeqCRangeIterLazy 264 293 +11.0% 0.90x
DropWhileAnySeqCntRangeLazy 264 293 +11.0% 0.90x (?)
ObjectiveCBridgeStubFromNSString 896 994 +10.9% 0.90x (?)
DictionaryOfAnyHashableStrings_insert 5670 6286 +10.9% 0.90x (?)
StringHashing_fastPrenormal 840 930 +10.7% 0.90x
DictionaryLiteral 3300 3640 +10.3% 0.91x (?)
PrefixWhileAnyCollectionLazy 176 194 +10.2% 0.91x (?)
PrefixAnySeqCRangeIterLazy 176 194 +10.2% 0.91x
PrefixAnySeqCntRangeLazy 176 194 +10.2% 0.91x (?)
PrefixWhileAnySeqCRangeIterLazy 176 194 +10.2% 0.91x
PrefixWhileAnySeqCntRangeLazy 176 194 +10.2% 0.91x
NSStringConversion.Rebridge.Medium 167 184 +10.2% 0.91x (?)
NSStringConversion.Rebridge.Long 167 184 +10.2% 0.91x (?)
String.replaceSubrange.ArrChar.Small 69 76 +10.1% 0.91x (?)
StringRemoveDupes 306 337 +10.1% 0.91x
DictionaryCompactMapValuesOfCastValue 7020 7722 +10.0% 0.91x (?)
PrimsSplit 955 1050 +9.9% 0.91x (?)
DropFirstAnySeqCRangeIter 181 199 +9.9% 0.91x
DropFirstAnySeqCntRange 181 199 +9.9% 0.91x (?)
DropWhileAnySeqCRangeIter 183 201 +9.8% 0.91x (?)
FloatingPointPrinting_Float_description_small 4428 4860 +9.8% 0.91x
String.data.Small 41 45 +9.8% 0.91x (?)
AngryPhonebook.Armenian.Small 783 858 +9.6% 0.91x (?)
SuffixAnySequenceLazy 4552 4987 +9.6% 0.91x
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 85000 93000 +9.4% 0.91x (?)
DropWhileAnyCollectionLazy 247 270 +9.3% 0.91x (?)
DictionarySubscriptDefaultMutation 323 353 +9.3% 0.92x (?)
NSArray.bridged.mutableCopy.objectAtIndex 1013 1107 +9.3% 0.92x (?)
SuffixArray 11 12 +9.1% 0.92x
DropWhileAnyCollection 200 218 +9.0% 0.92x
FloatingPointPrinting_Float_description_uniform 4500 4900 +8.9% 0.92x
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 73500 80000 +8.8% 0.92x (?)
ReversedDictionary2 315 342 +8.6% 0.92x (?)
CharIteration_tweet_unicodeScalars_Backwards 8960 9720 +8.5% 0.92x (?)
DropWhileAnySeqCntRange 201 218 +8.5% 0.92x (?)
NSStringConversion.LongUTF8 498 540 +8.4% 0.92x (?)
DropFirstAnySeqCRangeIterLazy 216 234 +8.3% 0.92x
DropFirstAnySeqCntRangeLazy 216 234 +8.3% 0.92x (?)
CSVParsing.UTF16 49 53 +8.2% 0.92x (?)
NormalizedIterator_ascii 123 133 +8.1% 0.92x (?)
String.replaceSubrange.String.Small 62 67 +8.1% 0.93x
CharIteration_ascii_unicodeScalars_Backwards 4520 4880 +8.0% 0.93x (?)
String.data.Empty 39 42 +7.7% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
Set.isSuperset.Seq.Box25 243 151 -37.9% 1.61x
SetIsSubsetBox25 250 169 -32.4% 1.48x
Set.isStrictSubset.Box25 250 170 -32.0% 1.47x
Breadcrumbs.CopyUTF16CodeUnits.ASCII 28 20 -28.6% 1.40x
Set.isDisjoint.Box25 697 523 -25.0% 1.33x
UTF8Decode_InitDecoding 253 193 -23.7% 1.31x
UTF8Decode_InitFromCustom_contiguous 257 199 -22.6% 1.29x
UTF8Decode_InitFromBytes 252 202 -19.8% 1.25x (?)
UTF8Decode_InitFromData 243 196 -19.3% 1.24x
StringFromLongWholeSubstringGeneric 6 5 -16.7% 1.20x
Set.isDisjoint.Seq.Box0 797 671 -15.8% 1.19x
Set.isStrictSubset.Seq.Int0 468 395 -15.6% 1.18x
Set.isDisjoint.Box0 818 691 -15.5% 1.18x
Set.isStrictSuperset.Seq.Int25 466 394 -15.5% 1.18x (?)
Set.isStrictSuperset.Seq.Int50 464 396 -14.7% 1.17x
Set.isStrictSuperset.Seq.Int0 4624 3958 -14.4% 1.17x (?)
Set.isSubset.Seq.Int0 469 403 -14.1% 1.16x (?)
SetIntersectionBox0 164 141 -14.0% 1.16x
Set.isDisjoint.Seq.Box25 573 494 -13.8% 1.16x
DictionaryKeysContainsNative 31 27 -12.9% 1.15x (?)
Set.isStrictSubset.Seq.Int25 539 470 -12.8% 1.15x
ArrayAppendUTF16Substring 31968 28116 -12.0% 1.14x
UTF8Decode_InitFromCustom_noncontiguous 460 405 -12.0% 1.14x
ObjectiveCBridgeFromNSArrayAnyObject 22800 20100 -11.8% 1.13x (?)
ArrayAppendLatin1Substring 32544 28728 -11.7% 1.13x
Set.isSubset.Seq.Int25 538 475 -11.7% 1.13x
ArrayAppendAsciiSubstring 31788 28152 -11.4% 1.13x
ArrayAppendAscii 3910 3468 -11.3% 1.13x (?)
ArrayAppendUTF16 3910 3468 -11.3% 1.13x
ArrayAppendLatin1 4012 3570 -11.0% 1.12x
SetIntersectionBox25 307 274 -10.7% 1.12x
BinaryFloatingPointPropertiesBinade 28 25 -10.7% 1.12x
Set.isStrictSubset.Seq.Int50 615 550 -10.6% 1.12x
PrefixAnySeqCRangeIter 193 175 -9.3% 1.10x
Set.isSubset.Seq.Int50 612 555 -9.3% 1.10x
Set.isDisjoint.Box.Empty 167 152 -9.0% 1.10x (?)
DataCountSmall 34 31 -8.8% 1.10x
StringInterpolation 12700 11600 -8.7% 1.09x (?)
BitCount 224 205 -8.5% 1.09x
DataSetCountMedium 360 330 -8.3% 1.09x (?)
Array2D 7520 6928 -7.9% 1.09x
Set.intersection.Seq.Int0 154 142 -7.8% 1.08x (?)
ConvertFloatingPoint.MockFloat64Exactly2 13 12 -7.7% 1.08x
ArrayPlusEqualThreeElements 1880 1750 -6.9% 1.07x (?)
Breadcrumbs.CopyUTF16CodeUnits.Mixed 87 81 -6.9% 1.07x (?)
Set.isDisjoint.Seq.Box.Empty 148 138 -6.8% 1.07x (?)
UTF8Decode_InitFromCustom_contiguous_ascii 298 278 -6.7% 1.07x (?)

Code size: -Osize

Regression OLD NEW DELTA RATIO
Suffix.o 19567 24787 +26.7% 0.79x
IntegerParsing.o 51359 55876 +8.8% 0.92x
ArraySubscript.o 2193 2324 +6.0% 0.94x
PopFrontGeneric.o 2501 2626 +5.0% 0.95x
CSVParsing.o 52729 55052 +4.4% 0.96x
BitCount.o 1407 1464 +4.1% 0.96x
BinaryFloatingPointProperties.o 4636 4823 +4.0% 0.96x
StrComplexWalk.o 2462 2561 +4.0% 0.96x
PopFront.o 3216 3344 +4.0% 0.96x
RangeOverlaps.o 5445 5645 +3.7% 0.96x
SortIntPyramids.o 8662 8946 +3.3% 0.97x
StringInterpolation.o 6323 6518 +3.1% 0.97x
RC4.o 2937 3017 +2.7% 0.97x
DictionaryBridgeToObjC.o 4275 4377 +2.4% 0.98x
RangeReplaceableCollectionPlusDefault.o 4462 4554 +2.1% 0.98x
ArraySetElement.o 1152 1175 +2.0% 0.98x
Sim2DArray.o 1204 1227 +1.9% 0.98x
COWArrayGuaranteedParameterOverhead.o 1223 1246 +1.9% 0.98x
NSStringConversion.o 11091 11257 +1.5% 0.99x
CharacterProperties.o 22472 22771 +1.3% 0.99x
Array2D.o 2598 2632 +1.3% 0.99x
Memset.o 1791 1814 +1.3% 0.99x
DictionaryKeysContains.o 7816 7910 +1.2% 0.99x
SequenceAlgos.o 20758 20986 +1.1% 0.99x
 
Improvement OLD NEW DELTA RATIO
Histogram.o 2372 1561 -34.2% 1.52x
TwoSum.o 3380 2677 -20.8% 1.26x
StringRemoveDupes.o 4640 3706 -20.1% 1.25x
DictionaryOfAnyHashableStrings.o 6531 5498 -15.8% 1.19x
DictTest4Legacy.o 14038 11938 -15.0% 1.18x
DictionarySubscriptDefault.o 15697 13476 -14.1% 1.16x
DictTest4.o 13475 11679 -13.3% 1.15x
DictTest2.o 8833 7984 -9.6% 1.11x
ReversedCollections.o 8055 7291 -9.5% 1.10x
StrToInt.o 3323 3008 -9.5% 1.10x
PrimsNonStrongRef.o 93147 84699 -9.1% 1.10x
DictTest.o 11939 10965 -8.2% 1.09x
ReduceInto.o 8788 8075 -8.1% 1.09x
DictTest3.o 13293 12415 -6.6% 1.07x
Prims.o 11339 10628 -6.3% 1.07x
PrimsSplit.o 11391 10680 -6.2% 1.07x
RGBHistogram.o 20218 19208 -5.0% 1.05x
DictOfArraysToArrayOfDicts.o 20799 19947 -4.1% 1.04x
StringBuilder.o 7376 7084 -4.0% 1.04x
DriverUtils.o 121925 118545 -2.8% 1.03x
RomanNumbers.o 5446 5296 -2.8% 1.03x
StringMatch.o 4015 3932 -2.1% 1.02x
TestsUtils.o 23114 22754 -1.6% 1.02x
ClassArrayGetter.o 3187 3138 -1.5% 1.02x
DictionaryCompactMapValues.o 12451 12264 -1.5% 1.02x
SetTests.o 111789 110442 -1.2% 1.01x
MonteCarloE.o 2689 2657 -1.2% 1.01x
LuhnAlgoEager.o 14909 14741 -1.1% 1.01x
LuhnAlgoLazy.o 14909 14741 -1.1% 1.01x
LazyFilter.o 7410 7331 -1.1% 1.01x

Performance: -Onone

Regression OLD NEW DELTA RATIO
Breadcrumbs.MutatedUTF16ToIdx.Mixed 288 1256 +336.1% 0.23x
Breadcrumbs.MutatedIdxToUTF16.Mixed 321 1269 +295.3% 0.25x
BinaryFloatingPointPropertiesNextUp 231 863 +273.6% 0.27x
BinaryFloatingPointPropertiesUlp 234 860 +267.5% 0.27x
NSStringConversion.Long 5750 10357 +80.1% 0.56x
NSStringConversion.Medium 2272 3906 +71.9% 0.58x
NSStringConversion.MutableCopy.Long 2179 3261 +49.7% 0.67x
CharIteration_utf16_unicodeScalars_Backwards 139680 204080 +46.1% 0.68x
ArrayOfPOD 1065 1556 +46.1% 0.68x (?)
NSStringConversion.LongUTF8 2065 2953 +43.0% 0.70x (?)
NSStringConversion.MutableCopy.Medium 1957 2682 +37.0% 0.73x
NSStringConversion.UTF8 2714 3707 +36.6% 0.73x
Join 172 230 +33.7% 0.75x
NSStringConversion.MutableCopy.LongUTF8 1458 1924 +32.0% 0.76x (?)
AngryPhonebook.Strasse 171 222 +29.8% 0.77x
AngryPhonebook.Armenian 197 247 +25.4% 0.80x
StringWordBuilderReservingCapacity 2720 3410 +25.4% 0.80x (?)
AngryPhonebook.Cyrillic 213 265 +24.4% 0.80x
AngryPhonebook 553 686 +24.1% 0.81x
UnicodeStringFromCodable 516 640 +24.0% 0.81x
StrComplexWalk 29370 36390 +23.9% 0.81x (?)
StringWordBuilder 2800 3460 +23.6% 0.81x (?)
CharIteration_ascii_unicodeScalars_Backwards 139800 170320 +21.8% 0.82x (?)
CharIteration_tweet_unicodeScalars_Backwards 277360 337200 +21.6% 0.82x (?)
CharIteration_chinese_unicodeScalars_Backwards 109960 133600 +21.5% 0.82x (?)
CharIteration_japanese_unicodeScalars_Backwards 173840 210280 +21.0% 0.83x (?)
CharIteration_russian_unicodeScalars_Backwards 120320 145360 +20.8% 0.83x (?)
ArrayOfGenericPOD2 1088 1313 +20.7% 0.83x (?)
CharIteration_korean_unicodeScalars_Backwards 142360 171680 +20.6% 0.83x (?)
String.replaceSubrange.Substring 93 111 +19.4% 0.84x (?)
RemoveWhereFilterString 448 534 +19.2% 0.84x
CharIteration_punctuated_unicodeScalars_Backwards 32520 38680 +18.9% 0.84x (?)
StringWalk 25280 29920 +18.4% 0.84x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 26000 30680 +18.0% 0.85x (?)
AngryPhonebook.ASCII2.Small 262 307 +17.2% 0.85x
ArrayPlusEqualSingleElementCollection 173430 201912 +16.4% 0.86x (?)
ArrayPlusEqualFiveElementCollection 140156 161024 +14.9% 0.87x (?)
String.replaceSubrange.Substring.Small 81 92 +13.6% 0.88x (?)
ObjectiveCBridgeStringIsEqual2 316 357 +13.0% 0.89x
ObjectiveCBridgeStubFromNSString 1005 1134 +12.8% 0.89x (?)
CStringShortAscii 3780 4230 +11.9% 0.89x (?)
StringInterpolationManySmallSegments 15000 16700 +11.3% 0.90x (?)
StringEnumRawValueInitialization 14080 15580 +10.7% 0.90x (?)
FindString.Loop1.Substring 817 903 +10.5% 0.90x (?)
String.replaceSubrange.String.Small 69 76 +10.1% 0.91x
ObjectiveCBridgeFromNSString 2745 3020 +10.0% 0.91x (?)
StringHashing_fastPrenormal 900 990 +10.0% 0.91x
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 88500 96000 +8.5% 0.92x (?)
StringHasPrefixAscii 6000 6500 +8.3% 0.92x
Breadcrumbs.MutatedIdxToUTF16.ASCII 12 13 +8.3% 0.92x (?)
StringHashing_latin1 342 370 +8.2% 0.92x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 83500 90000 +7.8% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
DataCopyBytesSmall 2941 839 -71.5% 3.51x
DataCopyBytesMedium 3056 982 -67.9% 3.11x
BitCount 52111 20565 -60.5% 2.53x
ByteSwap 18285 7588 -58.5% 2.41x
DataCountSmall 1491 740 -50.4% 2.01x
DataCountMedium 1495 748 -50.0% 2.00x
ProtocolDispatch 14858 7470 -49.7% 1.99x
CharIndexing_korean_unicodeScalars_Backwards 339400 171800 -49.4% 1.98x
PointerArithmetics 1487800 755400 -49.2% 1.97x
CharIndexing_punctuated_unicodeScalars_Backwards 76720 39280 -48.8% 1.95x
CharIndexing_russian_unicodeScalars_Backwards 284360 146800 -48.4% 1.94x
ExclusivityGlobal 1579 827 -47.6% 1.91x
CharIndexing_japanese_unicodeScalars_Backwards 403520 211400 -47.6% 1.91x
CharIndexing_chinese_unicodeScalars_Backwards 256680 134600 -47.6% 1.91x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 58600 30800 -47.4% 1.90x
CharIndexing_ascii_unicodeScalars_Backwards 332680 175400 -47.3% 1.90x
CharIndexing_utf16_unicodeScalars_Backwards 346240 182960 -47.2% 1.89x
CharIndexing_tweet_unicodeScalars_Backwards 652280 348280 -46.6% 1.87x
SubstringFromLongString 82 44 -46.3% 1.86x
DataAccessBytesMedium 1575 849 -46.1% 1.86x
DataAccessBytesSmall 1631 880 -46.0% 1.85x
HTTP2StateMachine 1737364 937692 -46.0% 1.85x
StringFromLongWholeSubstring 82 45 -45.1% 1.82x
DataSetCountSmall 1584 891 -43.7% 1.78x
DataMutateBytesSmall 1780 1020 -42.7% 1.75x
NopDeinit 912200 531200 -41.8% 1.72x
StringFromLongWholeSubstringGeneric 91 53 -41.8% 1.72x
DataAppendBytesSmall 1800 1064 -40.9% 1.69x
DataSetCountMedium 1860 1110 -40.3% 1.68x
Radix2CooleyTukeyf 93600 56448 -39.7% 1.66x
NSStringConversion 1984 1229 -38.1% 1.61x
SubstringFromLongStringGeneric 99 62 -37.4% 1.60x
MonteCarloPi 10427000 6618250 -36.5% 1.58x
ArraySubscript 207992 132580 -36.3% 1.57x
Radix2CooleyTukey 101568 64752 -36.2% 1.57x
MonteCarloE 2252020 1454200 -35.4% 1.55x
FloatingPointPrinting_Float_description_small 22464 14580 -35.1% 1.54x
ArrayValueProp4 8833 5804 -34.3% 1.52x
ArrayValueProp3 8851 5899 -33.4% 1.50x
RandomIntegersLCG 44223 29677 -32.9% 1.49x
Set.isDisjoint.Int100 931 630 -32.3% 1.48x
OpenClose 2103 1431 -32.0% 1.47x
Set.isDisjoint.Int.Empty 739 503 -31.9% 1.47x
Set.subtracting.Box.Empty 151 103 -31.8% 1.47x (?)
Set.isDisjoint.Int25 1209 828 -31.5% 1.46x
Set.isDisjoint.Int50 1162 796 -31.5% 1.46x
Set.isDisjoint.Empty.Box 604 414 -31.5% 1.46x
SevenBoom 2049 1406 -31.4% 1.46x (?)
Set.isDisjoint.Empty.Int 590 406 -31.2% 1.45x
NSStringConversion.Rebridge 645 444 -31.2% 1.45x (?)
Set.subtracting.Empty.Box 116 80 -31.0% 1.45x
EqualSubstringSubstringGenericEquatable 120 83 -30.8% 1.45x
ExclusivityIndependent 236 164 -30.5% 1.44x
LessSubstringSubstring 123 86 -30.1% 1.43x
EqualSubstringSubstring 123 86 -30.1% 1.43x
EqualSubstringString 123 86 -30.1% 1.43x
CharacterLiteralsLarge 2068 1448 -30.0% 1.43x
Set.isDisjoint.Box.Empty 752 530 -29.5% 1.42x
LessSubstringSubstringGenericComparable 120 85 -29.2% 1.41x
EqualStringSubstring 124 88 -29.0% 1.41x
Set.subtracting.Int.Empty 163 117 -28.2% 1.39x (?)
DataReplaceSmallBuffer 6400 4600 -28.1% 1.39x
Set.subtracting.Empty.Int 132 95 -28.0% 1.39x
UTF8Decode_InitDecoding 289 210 -27.3% 1.38x
RandomDoubleLCG 58536 43422 -25.8% 1.35x
DataToStringEmpty 3200 2400 -25.0% 1.33x (?)
AnyHashableWithAClass 158500 119500 -24.6% 1.33x (?)
ProtocolDispatch2 12600 9540 -24.3% 1.32x
DataAppendBytesMedium 6720 5100 -24.1% 1.32x (?)
StringAdder 1440 1096 -23.9% 1.31x
String.data.Small 110 84 -23.6% 1.31x (?)
CharacterLiteralsSmall 2593 1987 -23.4% 1.30x
DataReplaceMediumBuffer 8700 6700 -23.0% 1.30x (?)
NSStringConversion.Rebridge.Mutable 1752 1354 -22.7% 1.29x (?)
FloatingPointPrinting_Double_description_small 34300 26600 -22.4% 1.29x (?)
DataReplaceMedium 6700 5200 -22.4% 1.29x (?)
DataAppendArray 6700 5200 -22.4% 1.29x (?)
Set.isDisjoint.Int0 983 767 -22.0% 1.28x
DictionaryRemove 27340 21360 -21.9% 1.28x
UTF8Decode_InitFromData 251 197 -21.5% 1.27x
String.data.Empty 107 84 -21.5% 1.27x (?)
UTF8Decode_InitFromCustom_contiguous 270 212 -21.5% 1.27x
DataReplaceSmall 4700 3700 -21.3% 1.27x (?)
ArrayOfRef 10700 8450 -21.0% 1.27x (?)
DataToStringSmall 5950 4700 -21.0% 1.27x (?)
DataToStringMedium 9350 7400 -20.9% 1.26x (?)
ArrayOfGenericRef 10940 8660 -20.8% 1.26x (?)
CreateObjects 3243 2574 -20.6% 1.26x
UTF8Decode_InitFromBytes 258 205 -20.5% 1.26x (?)
DataAppendDataMediumToMedium 6920 5500 -20.5% 1.26x (?)
RandomIntegersDef 77900 62000 -20.4% 1.26x
PopFrontArrayGeneric 6780 5400 -20.4% 1.26x
DataToStringLargeUnicode 11150 8900 -20.2% 1.25x (?)
NSDictionaryCastToSwift 3980 3190 -19.8% 1.25x (?)
StackPromo 69600 55900 -19.7% 1.25x (?)
String.data.Medium 241 194 -19.5% 1.24x (?)
NSStringConversion.Rebridge.Long 367 296 -19.3% 1.24x (?)
DataAppendDataMediumToSmall 6260 5060 -19.2% 1.24x (?)
NSStringConversion.Rebridge.Medium 367 297 -19.1% 1.24x (?)
SetIsSubsetInt25 257 210 -18.3% 1.22x
SetIntersect 1880 1540 -18.1% 1.22x
DataAppendDataSmallToSmall 6560 5380 -18.0% 1.22x (?)
DataMutateBytesMedium 4240 3480 -17.9% 1.22x (?)
Set.isStrictSubset.Int25 257 211 -17.9% 1.22x
FloatingPointPrinting_Float80_description_small 46224 38016 -17.8% 1.22x (?)
NSError 851 700 -17.7% 1.22x (?)
SetIntersectionInt0 187 154 -17.6% 1.21x
RandomDoubleDef 92800 76500 -17.6% 1.21x (?)
ArrayInitFromSlice 650 536 -17.5% 1.21x (?)
Set.subtracting.Seq.Empty.Int 623 514 -17.5% 1.21x
StringToDataEmpty 3800 3150 -17.1% 1.21x (?)
Dictionary2 1905 1580 -17.1% 1.21x
SetIsSubsetInt50 484 402 -16.9% 1.20x
Set.isStrictSubset.Int50 485 403 -16.9% 1.20x
Set.isDisjoint.Box25 2391 1988 -16.9% 1.20x
DataAppendDataSmallToMedium 6320 5260 -16.8% 1.20x (?)
DataReset 4200 3500 -16.7% 1.20x (?)
NSStringConversion.MutableCopy.Rebridge.UTF8 1225 1022 -16.6% 1.20x (?)
StringToDataSmall 3950 3300 -16.5% 1.20x (?)
SetIsSubsetInt100 851 711 -16.5% 1.20x
StringInterpolation 15400 12900 -16.2% 1.19x (?)
DevirtualizeProtocolComposition 8980 7526 -16.2% 1.19x
ErrorHandling 4800 4040 -15.8% 1.19x (?)
Walsh 9369 7924 -15.4% 1.18x
Set.subtracting.Seq.Empty.Box 638 540 -15.4% 1.18x (?)
String.data.LargeUnicode 254 215 -15.4% 1.18x (?)
DictionaryBridgeToObjC_Bridge 33 28 -15.2% 1.18x (?)
DictionaryRemoveOfObjects 56300 47800 -15.1% 1.18x (?)
ArrayValueProp 5259 4470 -15.0% 1.18x (?)
DictionarySwapAt 5164 4440 -14.0% 1.16x (?)
UTF8Decode_InitFromData_ascii_as_ascii 822 708 -13.9% 1.16x (?)
LuhnAlgoEager 5026 4330 -13.8% 1.16x (?)
LuhnAlgoLazy 5179 4463 -13.8% 1.16x (?)
StringToDataLargeUnicode 9400 8150 -13.3% 1.15x (?)
StringInterpolationSmall 4680 4060 -13.2% 1.15x (?)
ArrayValueProp2 7075 6156 -13.0% 1.15x (?)
Set.subtracting.Seq.Int.Empty 914 805 -11.9% 1.14x (?)
DictionaryCompactMapValuesOfCastValue 56268 49626 -11.8% 1.13x
HashTest 13610 12040 -11.5% 1.13x (?)
NSStringConversion.MutableCopy.Rebridge.Medium 892 792 -11.2% 1.13x (?)
DictionaryBridgeToObjC_BulkAccess 190 169 -11.1% 1.12x (?)
CStringLongAscii 400 357 -10.7% 1.12x (?)
RangeReplaceableCollectionPlusDefault 6996 6256 -10.6% 1.12x (?)
Set.isDisjoint.Box0 2702 2420 -10.4% 1.12x (?)
ReversedBidirectional 110500 99011 -10.4% 1.12x (?)
Set.subtracting.Seq.Box.Empty 915 822 -10.2% 1.11x
SetIntersectionInt25 395 355 -10.1% 1.11x
Sim2DArray 15771 14196 -10.0% 1.11x
NibbleSort 702090 634370 -9.6% 1.11x (?)
DataCreateSmall 86450 78360 -9.4% 1.10x
NSStringConversion.Rebridge.LongUTF8 111 101 -9.0% 1.10x (?)
NSStringConversion.Rebridge.UTF8 929 847 -8.8% 1.10x (?)
StrToInt 42880 39220 -8.5% 1.09x
CharacterPropertiesStashedMemo 3700 3390 -8.4% 1.09x (?)
NSStringConversion.Mutable 3520 3230 -8.2% 1.09x (?)
IndexPath.Subscript.Range.Mutation 255 235 -7.8% 1.09x (?)
SetIsSubsetBox25 843 777 -7.8% 1.08x (?)
Set.isStrictSubset.Box25 846 780 -7.8% 1.08x (?)
MapReduceShortString 247 228 -7.7% 1.08x (?)
SetIntersectionBox0 559 517 -7.5% 1.08x (?)
SetIntersectionInt50 564 523 -7.3% 1.08x (?)
Set.isStrictSubset.Int0 668 620 -7.2% 1.08x (?)
Dictionary2OfObjects 4355 4060 -6.8% 1.07x (?)
SetIsSubsetInt0 651 607 -6.8% 1.07x (?)
DictionarySwapAtOfObjects 18370 17149 -6.6% 1.07x (?)

Code size: -swiftlibs

Improvement OLD NEW DELTA RATIO
libswiftSwiftOnoneSupport.dylib 163840 147456 -10.0% 1.11x
libswiftCore.dylib 3932160 3719168 -5.4% 1.06x
libswiftFoundation.dylib 1343488 1310720 -2.4% 1.02x
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

@gottesmm gottesmm force-pushed the ossa-serialize-then-lower-ownership branch from 5debe43 to b2c5f85 Compare February 10, 2021 07:50
@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm
Copy link
Contributor Author

@swift-ci benchmark

@gottesmm
Copy link
Contributor Author

@swift-ci test source compatibility

@gottesmm
Copy link
Contributor Author

@swift-ci build toolchain

@eeckstein
Copy link
Contributor

Any idea why there is so much churn in the benchmarks?

@swift-ci
Copy link
Contributor

Performance: -O

Regression OLD NEW DELTA RATIO
Breadcrumbs.MutatedUTF16ToIdx.Mixed 268 1249 +366.0% 0.21x
Breadcrumbs.MutatedIdxToUTF16.Mixed 303 1254 +313.9% 0.24x
NSStringConversion.Long 994 2137 +115.0% 0.47x
NSStringConversion.Medium 442 897 +102.9% 0.49x
NSStringConversion.UTF8 775 1141 +47.2% 0.68x (?)
StringWordBuilderReservingCapacity 2130 3010 +41.3% 0.71x
StringWordBuilder 2170 3060 +41.0% 0.71x
NSStringConversion.MutableCopy.Long 811 1105 +36.3% 0.73x
RemoveWhereFilterString 291 387 +33.0% 0.75x (?)
NSStringConversion.MutableCopy.Medium 815 1061 +30.2% 0.77x
AngryPhonebook.Strasse 171 222 +29.8% 0.77x
AngryPhonebook.ASCII2.Small 159 205 +28.9% 0.78x
AngryPhonebook 350 448 +28.0% 0.78x
Join 209 266 +27.3% 0.79x
NSStringConversion.Rebridge.LongUTF8 53 67 +26.4% 0.79x (?)
NSStringConversion.Rebridge.UTF8 445 559 +25.6% 0.80x (?)
AngryPhonebook.Armenian 197 247 +25.4% 0.80x
UnicodeStringFromCodable 493 618 +25.4% 0.80x
AngryPhonebook.Cyrillic 212 265 +25.0% 0.80x
ConvertFloatingPoint.MockFloat64ToInt64 751 915 +21.8% 0.82x
StringMatch 6200 7500 +21.0% 0.83x
String.replaceSubrange.Substring 88 106 +20.5% 0.83x
ArrayAppendLatin1Substring 16092 19116 +18.8% 0.84x
DictionaryBridgeToObjC_Bridge 16 19 +18.7% 0.84x
ArrayAppendUTF16Substring 15912 18756 +17.9% 0.85x
ArrayAppendAsciiSubstring 15912 18756 +17.9% 0.85x
StringHasSuffixAscii 2310 2710 +17.3% 0.85x (?)
ObjectiveCBridgeFromNSString 1185 1370 +15.6% 0.86x (?)
FindString.Loop1.Substring 495 567 +14.5% 0.87x
ParseInt.UInt64.Decimal 200 229 +14.5% 0.87x
RemoveWhereQuadraticString 284 325 +14.4% 0.87x (?)
UTF8Decode_InitFromCustom_contiguous_ascii_as_ascii 392 447 +14.0% 0.88x (?)
Set.isDisjoint.Seq.Int.Empty 72 82 +13.9% 0.88x
FindString.Rec3.Substring 190 216 +13.7% 0.88x
StringSwitch 497 564 +13.5% 0.88x
FlattenListFlatMap 5325 6038 +13.4% 0.88x (?)
SubstringEqualString 398 450 +13.1% 0.88x (?)
ObjectiveCBridgeStubFromNSString 890 1006 +13.0% 0.88x (?)
StringHasPrefixAscii 2140 2400 +12.1% 0.89x
ObjectiveCBridgeStringIsEqual2 314 352 +12.1% 0.89x (?)
String.replaceSubrange.Substring.Small 75 84 +12.0% 0.89x
FindString.Rec3.String 174 194 +11.5% 0.90x
CharIteration_punctuatedJapanese_unicodeScalars 720 800 +11.1% 0.90x
StringHashing_latin1 288 320 +11.1% 0.90x
StringHashing_fastPrenormal 840 930 +10.7% 0.90x (?)
CSVParsing.UTF16 49 54 +10.2% 0.91x
String.replaceSubrange.ArrChar.Small 69 76 +10.1% 0.91x (?)
DictionarySwap 1000 1100 +10.0% 0.91x
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 87000 95500 +9.8% 0.91x (?)
FloatingPointPrinting_Float_description_small 4428 4860 +9.8% 0.91x (?)
RomanNumbers2 589 642 +9.0% 0.92x
FloatingPointPrinting_Float_description_uniform 4500 4900 +8.9% 0.92x (?)
NSArray.bridged.mutableCopy.objectAtIndex 1014 1104 +8.9% 0.92x (?)
CharIteration_japanese_unicodeScalars 5000 5440 +8.8% 0.92x (?)
CharIteration_korean_unicodeScalars 3640 3960 +8.8% 0.92x
ParseInt.UInt64.Hex 325 353 +8.6% 0.92x
DataSetCountSmall 142 154 +8.5% 0.92x
CharIteration_chinese_unicodeScalars 2960 3200 +8.1% 0.93x (?)
String.replaceSubrange.String.Small 62 67 +8.1% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
Breadcrumbs.CopyUTF16CodeUnits.ASCII 28 20 -28.6% 1.40x
UTF8Decode_InitDecoding 252 194 -23.0% 1.30x
UTF8Decode_InitFromCustom_contiguous 257 201 -21.8% 1.28x
UTF8Decode_InitFromData 246 196 -20.3% 1.26x (?)
UTF8Decode_InitFromBytes 253 203 -19.8% 1.25x
StringFromLongWholeSubstringGeneric 6 5 -16.7% 1.20x
ObjectiveCBridgeFromNSArrayAnyObject 23700 20100 -15.2% 1.18x (?)
UTF8Decode_InitFromCustom_noncontiguous 456 401 -12.1% 1.14x
DictionaryBridgeToObjC_Access 917 814 -11.2% 1.13x (?)
ArrayAppendAscii 3672 3264 -11.1% 1.12x
ArrayAppendUTF16 3672 3264 -11.1% 1.12x
Diffing.Same 9 8 -11.1% 1.12x (?)
ArrayAppendLatin1 3740 3366 -10.0% 1.11x
ObjectiveCBridgeFromNSSetAnyObjectForced 5840 5300 -9.2% 1.10x (?)
ArrayPlusEqualThreeElements 1660 1520 -8.4% 1.09x (?)
ArrayInitFromSlice 516 474 -8.1% 1.09x (?)
String.data.Medium 124 115 -7.3% 1.08x (?)
CharIndexing_tweet_unicodeScalars_Backwards 10040 9320 -7.2% 1.08x (?)
COWArrayGuaranteedParameterOverhead 3500 3250 -7.1% 1.08x (?)
CharIndexing_tweet_unicodeScalars 10400 9680 -6.9% 1.07x
CharIndexing_ascii_unicodeScalars 5240 4880 -6.9% 1.07x (?)
CharIndexing_punctuated_unicodeScalars 1200 1120 -6.7% 1.07x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 1200 1120 -6.7% 1.07x (?)

Code size: -O

Regression OLD NEW DELTA RATIO
RomanNumbers.o 5830 6950 +19.2% 0.84x
IntegerParsing.o 56197 60565 +7.8% 0.93x
CSVParsing.o 56539 59883 +5.9% 0.94x
SortIntPyramids.o 8976 9216 +2.7% 0.97x
RangeOverlaps.o 6110 6270 +2.6% 0.97x
ArraySetElement.o 1288 1311 +1.8% 0.98x
COWArrayGuaranteedParameterOverhead.o 1363 1386 +1.7% 0.98x
Sim2DArray.o 1368 1391 +1.7% 0.98x
SequenceAlgos.o 21020 21284 +1.3% 0.99x
DiffingMyers.o 6685 6765 +1.2% 0.99x
StringMatch.o 4202 4250 +1.1% 0.99x
Memset.o 2207 2230 +1.0% 0.99x
Histogram.o 3032 3063 +1.0% 0.99x
 
Improvement OLD NEW DELTA RATIO
RangeReplaceableCollectionPlusDefault.o 5396 4846 -10.2% 1.11x
StrToInt.o 3553 3214 -9.5% 1.11x
StringBuilder.o 7873 7505 -4.7% 1.05x
DictionaryCompactMapValues.o 14197 13757 -3.1% 1.03x
DriverUtils.o 128943 124999 -3.1% 1.03x
LuhnAlgoEager.o 12774 12494 -2.2% 1.02x
LuhnAlgoLazy.o 12774 12494 -2.2% 1.02x
Combos.o 6022 5902 -2.0% 1.02x
FindStringNaive.o 8899 8739 -1.8% 1.02x
DictionarySwap.o 18137 17817 -1.8% 1.02x
ClassArrayGetter.o 3456 3408 -1.4% 1.01x
LazyFilter.o 8080 7984 -1.2% 1.01x
MonteCarloE.o 2833 2801 -1.1% 1.01x
Substring.o 19128 18920 -1.1% 1.01x

Performance: -Osize

Regression OLD NEW DELTA RATIO
Breadcrumbs.MutatedUTF16ToIdx.Mixed 270 1249 +362.6% 0.22x
Breadcrumbs.MutatedIdxToUTF16.Mixed 278 1253 +350.7% 0.22x
SuffixAnySequence 803 2590 +222.5% 0.31x
SuffixSequenceLazy 802 2551 +218.1% 0.31x
SuffixSequence 801 2401 +199.8% 0.33x
NSStringConversion.Long 1018 2150 +111.2% 0.47x
NSStringConversion.Medium 450 907 +101.6% 0.50x
Dict.CopyKeyValue.28k 1936 3377 +74.4% 0.57x
Dict.CopyKeyValue.16k 1003 1743 +73.8% 0.58x
Dict.CopyKeyValue.20k 1114 1911 +71.5% 0.58x
Dict.CopyKeyValue.24k 1250 2123 +69.8% 0.59x
NSStringConversion.UTF8 802 1188 +48.1% 0.68x
StringWordBuilderReservingCapacity 2130 3010 +41.3% 0.71x
StringWordBuilder 2180 3060 +40.4% 0.71x
NSStringConversion.MutableCopy.Long 773 1084 +40.2% 0.71x
NSStringConversion.MutableCopy.Medium 742 1024 +38.0% 0.72x
RemoveWhereFilterString 284 382 +34.5% 0.74x (?)
DropFirstSequence 58 76 +31.0% 0.76x (?)
DropFirstSequenceLazy 58 76 +31.0% 0.76x
AngryPhonebook.Strasse 170 222 +30.6% 0.77x
TwoSum 1172 1530 +30.5% 0.77x
AngryPhonebook.ASCII2.Small 159 205 +28.9% 0.78x
AngryPhonebook 350 448 +28.0% 0.78x
StringMatch 6500 8300 +27.7% 0.78x
FrequenciesUsingReduceInto 820 1040 +26.8% 0.79x
Join 209 264 +26.3% 0.79x
UnicodeStringFromCodable 493 618 +25.4% 0.80x
AngryPhonebook.Armenian 196 245 +25.0% 0.80x
NSStringConversion.Rebridge.LongUTF8 52 65 +25.0% 0.80x (?)
NSStringConversion.Rebridge.UTF8 436 543 +24.5% 0.80x (?)
AngryPhonebook.Cyrillic 212 264 +24.5% 0.80x
RGBHistogram 2270 2770 +22.0% 0.82x
DropFirstAnyCollection 164 199 +21.3% 0.82x
ParseInt.UIntSmall.Binary 706 849 +20.3% 0.83x
String.replaceSubrange.Substring 88 105 +19.3% 0.84x
DictionaryBridgeToObjC_Bridge 16 19 +18.7% 0.84x
FindString.Loop1.Substring 481 570 +18.5% 0.84x
StringHasSuffixAscii 2170 2570 +18.4% 0.84x
RomanNumbers2 570 675 +18.4% 0.84x
SuffixAnySeqCRangeIter 804 930 +15.7% 0.86x
ObjectiveCBridgeFromNSString 1190 1375 +15.5% 0.87x (?)
RemoveWhereQuadraticString 288 332 +15.3% 0.87x
ObjectiveCBridgeFromNSSetAnyObjectToString 70500 81000 +14.9% 0.87x (?)
SuffixAnySeqCntRange 754 866 +14.9% 0.87x
Dictionary2 860 985 +14.5% 0.87x (?)
StringHasPrefixAscii 2020 2310 +14.4% 0.87x
Dictionary 495 560 +13.1% 0.88x (?)
StringUTF16SubstringBuilder 3490 3940 +12.9% 0.89x (?)
ObjectiveCBridgeStubFromNSString 898 1008 +12.2% 0.89x (?)
StringSwitch 502 563 +12.2% 0.89x (?)
CharIteration_tweet_unicodeScalars_Backwards 8960 10040 +12.1% 0.89x (?)
String.replaceSubrange.Substring.Small 75 84 +12.0% 0.89x (?)
DropLastAnyCollection 59 66 +11.9% 0.89x (?)
ObjectiveCBridgeStringIsEqual2 316 353 +11.7% 0.90x
Prims 950 1060 +11.6% 0.90x (?)
SubstringEqualString 402 448 +11.4% 0.90x
Histogram 485 540 +11.3% 0.90x
StringHashing_latin1 288 320 +11.1% 0.90x (?)
PrimsSplit 950 1055 +11.1% 0.90x
DictionaryOfAnyHashableStrings_insert 5670 6286 +10.9% 0.90x (?)
FindString.Rec3.String 175 194 +10.9% 0.90x
NSStringConversion.Rebridge.Medium 167 185 +10.8% 0.90x (?)
StringHashing_fastPrenormal 840 930 +10.7% 0.90x (?)
DropWhileAnySeqCRangeIterLazy 264 292 +10.6% 0.90x
DropWhileAnySeqCntRangeLazy 264 292 +10.6% 0.90x (?)
StringRemoveDupes 305 337 +10.5% 0.91x (?)
PrefixWhileAnyCollectionLazy 176 194 +10.2% 0.91x (?)
PrefixAnySeqCRangeIterLazy 176 194 +10.2% 0.91x
PrefixAnySeqCntRangeLazy 176 194 +10.2% 0.91x (?)
PrefixWhileAnySeqCRangeIterLazy 176 194 +10.2% 0.91x (?)
PrefixWhileAnySeqCntRangeLazy 176 194 +10.2% 0.91x (?)
NSStringConversion.Rebridge.Long 167 184 +10.2% 0.91x (?)
String.replaceSubrange.ArrChar.Small 69 76 +10.1% 0.91x
DictionaryCompactMapValuesOfCastValue 7020 7722 +10.0% 0.91x (?)
DictionaryLiteral 3300 3630 +10.0% 0.91x (?)
DropFirstAnySeqCRangeIter 181 199 +9.9% 0.91x
DropFirstAnySeqCntRange 181 199 +9.9% 0.91x
SuffixAnySequenceLazy 4536 4987 +9.9% 0.91x (?)
DropWhileAnySeqCRangeIter 183 201 +9.8% 0.91x
FloatingPointPrinting_Float_description_small 4428 4860 +9.8% 0.91x
DictionarySubscriptDefaultMutation 322 353 +9.6% 0.91x (?)
NSArray.bridged.mutableCopy.objectAtIndex 1010 1105 +9.4% 0.91x (?)
DropWhileAnyCollectionLazy 247 270 +9.3% 0.91x (?)
SuffixArrayLazy 11 12 +9.1% 0.92x
SuffixArray 11 12 +9.1% 0.92x (?)
DropWhileAnyCollection 200 218 +9.0% 0.92x (?)
FloatingPointPrinting_Float_description_uniform 4500 4900 +8.9% 0.92x (?)
ReversedDictionary2 315 342 +8.6% 0.92x
DropWhileAnySeqCntRange 201 218 +8.5% 0.92x (?)
DropFirstAnySeqCRangeIterLazy 216 234 +8.3% 0.92x
DropFirstAnySeqCntRangeLazy 216 234 +8.3% 0.92x (?)
NSStringConversion.LongUTF8 498 539 +8.2% 0.92x (?)
CSVParsing.UTF16 49 53 +8.2% 0.92x (?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 86000 93000 +8.1% 0.92x (?)
NormalizedIterator_ascii 123 133 +8.1% 0.92x
String.replaceSubrange.String.Small 62 67 +8.1% 0.93x (?)
ObjectiveCBridgeFromNSStringForced 2565 2770 +8.0% 0.93x (?)
String.data.Empty 39 42 +7.7% 0.93x (?)
PrefixWhileAnyCollection 235 253 +7.7% 0.93x (?)
CSVParsingAltIndices2 869 935 +7.6% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
Set.isSuperset.Seq.Box25 243 151 -37.9% 1.61x
SetIsSubsetBox25 250 169 -32.4% 1.48x
Set.isStrictSubset.Box25 251 170 -32.3% 1.48x
Breadcrumbs.CopyUTF16CodeUnits.ASCII 28 20 -28.6% 1.40x
Set.isDisjoint.Box25 696 523 -24.9% 1.33x
UTF8Decode_InitDecoding 252 193 -23.4% 1.31x
UTF8Decode_InitFromCustom_contiguous 256 197 -23.0% 1.30x
UTF8Decode_InitFromData 244 194 -20.5% 1.26x (?)
UTF8Decode_InitFromBytes 251 202 -19.5% 1.24x (?)
StringFromLongWholeSubstringGeneric 6 5 -16.7% 1.20x
DictionaryBridgeToObjC_Access 965 809 -16.2% 1.19x (?)
Set.isStrictSubset.Seq.Int0 470 395 -16.0% 1.19x
Set.isStrictSuperset.Seq.Int25 467 393 -15.8% 1.19x
Set.isDisjoint.Seq.Box0 795 671 -15.6% 1.18x
Set.isDisjoint.Box0 819 692 -15.5% 1.18x
Set.isStrictSuperset.Seq.Int50 464 394 -15.1% 1.18x
Set.isStrictSuperset.Seq.Int0 4625 3966 -14.2% 1.17x
Set.isDisjoint.Seq.Box25 574 493 -14.1% 1.16x
Set.isSubset.Seq.Int0 470 404 -14.0% 1.16x
SetIntersectionBox0 164 141 -14.0% 1.16x
UTF8Decode_InitFromCustom_noncontiguous 460 400 -13.0% 1.15x
Set.isStrictSubset.Seq.Int25 539 470 -12.8% 1.15x
ArrayAppendAsciiSubstring 31968 28116 -12.0% 1.14x
Set.isSubset.Seq.Int25 538 476 -11.5% 1.13x (?)
ArrayAppendAscii 3910 3468 -11.3% 1.13x (?)
ArrayAppendUTF16 3910 3468 -11.3% 1.13x (?)
ArrayAppendUTF16Substring 31644 28116 -11.1% 1.13x (?)
ArrayAppendLatin1Substring 32328 28728 -11.1% 1.13x
Diffing.Same 9 8 -11.1% 1.12x (?)
ArrayAppendLatin1 4012 3570 -11.0% 1.12x
BinaryFloatingPointPropertiesBinade 28 25 -10.7% 1.12x
SetIntersectionBox25 306 274 -10.5% 1.12x
Set.isStrictSubset.Seq.Int50 613 549 -10.4% 1.12x
FlattenListFlatMap 6038 5420 -10.2% 1.11x (?)
ObjectiveCBridgeFromNSArrayAnyObject 22600 20400 -9.7% 1.11x (?)
PrefixAnySeqCRangeIter 193 175 -9.3% 1.10x (?)
Set.isSubset.Seq.Int50 613 556 -9.3% 1.10x (?)
Set.isDisjoint.Box.Empty 167 152 -9.0% 1.10x (?)
DataCountSmall 34 31 -8.8% 1.10x (?)
UTF8Decode_InitFromCustom_contiguous_ascii 299 273 -8.7% 1.10x (?)
BitCount 224 205 -8.5% 1.09x
DataSetCountMedium 360 330 -8.3% 1.09x (?)
StringInterpolation 12700 11700 -7.9% 1.09x (?)
Array2D 7520 6928 -7.9% 1.09x (?)
ConvertFloatingPoint.MockFloat64Exactly2 13 12 -7.7% 1.08x (?)
ArrayInitFromSlice 509 472 -7.3% 1.08x (?)
Set.intersection.Seq.Int0 153 142 -7.2% 1.08x (?)
Breadcrumbs.CopyUTF16CodeUnits.Mixed 87 81 -6.9% 1.07x (?)
IndexPath.Subscript.Mutation 428 399 -6.8% 1.07x (?)
Set.isDisjoint.Seq.Box.Empty 148 138 -6.8% 1.07x (?)

Code size: -Osize

Regression OLD NEW DELTA RATIO
Suffix.o 19567 24787 +26.7% 0.79x
IntegerParsing.o 51359 55876 +8.8% 0.92x
ArraySubscript.o 2193 2324 +6.0% 0.94x
PopFrontGeneric.o 2501 2626 +5.0% 0.95x
CSVParsing.o 52729 55052 +4.4% 0.96x
BitCount.o 1407 1464 +4.1% 0.96x
BinaryFloatingPointProperties.o 4636 4823 +4.0% 0.96x
StrComplexWalk.o 2462 2561 +4.0% 0.96x
PopFront.o 3216 3344 +4.0% 0.96x
RangeOverlaps.o 5445 5645 +3.7% 0.96x
SortIntPyramids.o 8662 8946 +3.3% 0.97x
StringInterpolation.o 6323 6518 +3.1% 0.97x
RC4.o 2937 3017 +2.7% 0.97x
DictionaryBridgeToObjC.o 4275 4377 +2.4% 0.98x
RangeReplaceableCollectionPlusDefault.o 4462 4554 +2.1% 0.98x
ArraySetElement.o 1152 1175 +2.0% 0.98x
Sim2DArray.o 1204 1227 +1.9% 0.98x
COWArrayGuaranteedParameterOverhead.o 1223 1246 +1.9% 0.98x
NSStringConversion.o 11091 11257 +1.5% 0.99x
CharacterProperties.o 22472 22771 +1.3% 0.99x
Array2D.o 2598 2632 +1.3% 0.99x
Memset.o 1791 1814 +1.3% 0.99x
DictionaryKeysContains.o 7816 7910 +1.2% 0.99x
SequenceAlgos.o 20758 20986 +1.1% 0.99x
 
Improvement OLD NEW DELTA RATIO
Histogram.o 2372 1561 -34.2% 1.52x
TwoSum.o 3380 2677 -20.8% 1.26x
StringRemoveDupes.o 4640 3706 -20.1% 1.25x
DictionaryOfAnyHashableStrings.o 6531 5498 -15.8% 1.19x
DictTest4Legacy.o 14038 11938 -15.0% 1.18x
DictionarySubscriptDefault.o 15697 13476 -14.1% 1.16x
DictTest4.o 13475 11679 -13.3% 1.15x
DictTest2.o 8833 7984 -9.6% 1.11x
ReversedCollections.o 8055 7291 -9.5% 1.10x
StrToInt.o 3323 3008 -9.5% 1.10x
PrimsNonStrongRef.o 93147 84699 -9.1% 1.10x
DictTest.o 11939 10965 -8.2% 1.09x
ReduceInto.o 8788 8075 -8.1% 1.09x
DictTest3.o 13293 12415 -6.6% 1.07x
Prims.o 11339 10628 -6.3% 1.07x
PrimsSplit.o 11391 10680 -6.2% 1.07x
RGBHistogram.o 20218 19208 -5.0% 1.05x
DictOfArraysToArrayOfDicts.o 20799 19947 -4.1% 1.04x
StringBuilder.o 7376 7084 -4.0% 1.04x
DriverUtils.o 121925 118545 -2.8% 1.03x
RomanNumbers.o 5446 5296 -2.8% 1.03x
StringMatch.o 4015 3932 -2.1% 1.02x
TestsUtils.o 23114 22754 -1.6% 1.02x
ClassArrayGetter.o 3187 3138 -1.5% 1.02x
DictionaryCompactMapValues.o 12451 12264 -1.5% 1.02x
SetTests.o 111789 110442 -1.2% 1.01x
MonteCarloE.o 2689 2657 -1.2% 1.01x
LuhnAlgoEager.o 14909 14741 -1.1% 1.01x
LuhnAlgoLazy.o 14909 14741 -1.1% 1.01x
LazyFilter.o 7410 7331 -1.1% 1.01x

Performance: -Onone

Regression OLD NEW DELTA RATIO
Breadcrumbs.MutatedUTF16ToIdx.Mixed 277 1256 +353.4% 0.22x
Breadcrumbs.MutatedIdxToUTF16.Mixed 300 1269 +323.0% 0.24x
BinaryFloatingPointPropertiesNextUp 231 863 +273.6% 0.27x
BinaryFloatingPointPropertiesUlp 234 860 +267.5% 0.27x
NSStringConversion.Long 5719 10376 +81.4% 0.55x
NSStringConversion.Medium 2242 3922 +74.9% 0.57x
NSStringConversion.MutableCopy.Long 2166 3270 +51.0% 0.66x
NSStringConversion.LongUTF8 1986 2967 +49.4% 0.67x
ArrayOfPOD 1063 1554 +46.2% 0.68x (?)
CharIteration_utf16_unicodeScalars_Backwards 139560 203920 +46.1% 0.68x
NSStringConversion.UTF8 2713 3934 +45.0% 0.69x
NSStringConversion.MutableCopy.Medium 1952 2731 +39.9% 0.71x
Join 172 230 +33.7% 0.75x
NSStringConversion.MutableCopy.LongUTF8 1479 1949 +31.8% 0.76x
AngryPhonebook.Strasse 171 222 +29.8% 0.77x
AngryPhonebook.Armenian 197 247 +25.4% 0.80x
StringWordBuilderReservingCapacity 2720 3410 +25.4% 0.80x (?)
StringWordBuilder 2770 3450 +24.5% 0.80x (?)
AngryPhonebook.Cyrillic 213 265 +24.4% 0.80x
AngryPhonebook 553 686 +24.1% 0.81x
StrComplexWalk 29380 36390 +23.9% 0.81x (?)
UnicodeStringFromCodable 520 638 +22.7% 0.82x
CharIteration_ascii_unicodeScalars_Backwards 139840 170240 +21.7% 0.82x (?)
CharIteration_tweet_unicodeScalars_Backwards 277200 337280 +21.7% 0.82x (?)
CharIteration_chinese_unicodeScalars_Backwards 109800 133560 +21.6% 0.82x (?)
CharIteration_russian_unicodeScalars_Backwards 120320 145480 +20.9% 0.83x (?)
ArrayOfGenericPOD2 1081 1307 +20.9% 0.83x (?)
CharIteration_japanese_unicodeScalars_Backwards 173880 210120 +20.8% 0.83x (?)
String.replaceSubrange.Substring 92 111 +20.7% 0.83x (?)
CharIteration_korean_unicodeScalars_Backwards 142320 171680 +20.6% 0.83x (?)
ObjectiveCBridgeFromNSString 2585 3110 +20.3% 0.83x (?)
RemoveWhereFilterString 447 534 +19.5% 0.84x
CharIteration_punctuated_unicodeScalars_Backwards 32520 38680 +18.9% 0.84x (?)
StringWalk 25280 29920 +18.4% 0.84x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 26000 30720 +18.2% 0.85x (?)
AngryPhonebook.ASCII2.Small 262 308 +17.6% 0.85x
ArrayPlusEqualSingleElementCollection 173712 201630 +16.1% 0.86x (?)
ArrayPlusEqualFiveElementCollection 140304 160839 +14.6% 0.87x (?)
ObjectiveCBridgeFromNSSetAnyObjectToString 79000 90000 +13.9% 0.88x (?)
String.replaceSubrange.Substring.Small 81 92 +13.6% 0.88x
ObjectiveCBridgeStubFromNSString 1008 1141 +13.2% 0.88x (?)
StringEnumRawValueInitialization 13880 15600 +12.4% 0.89x (?)
ObjectiveCBridgeStringIsEqual2 317 353 +11.4% 0.90x (?)
FlattenListFlatMap 239859 265973 +10.9% 0.90x (?)
FindString.Loop1.Substring 818 903 +10.4% 0.91x
String.replaceSubrange.String.Small 69 76 +10.1% 0.91x (?)
StringHashing_fastPrenormal 900 990 +10.0% 0.91x
StringInterpolationManySmallSegments 15100 16600 +9.9% 0.91x (?)
ObjectiveCBridgeFromNSStringForced 2835 3095 +9.2% 0.92x (?)
Breadcrumbs.MutatedIdxToUTF16.ASCII 12 13 +8.3% 0.92x (?)
 
Improvement OLD NEW DELTA RATIO
DataCopyBytesSmall 2938 839 -71.4% 3.50x
DataCopyBytesMedium 3050 984 -67.7% 3.10x
BitCount 52140 20610 -60.5% 2.53x
ByteSwap 18308 7634 -58.3% 2.40x
DataCountSmall 1492 741 -50.3% 2.01x
DataCountMedium 1503 747 -50.3% 2.01x
ProtocolDispatch 14916 7475 -49.9% 2.00x
PointerArithmetics 1491800 754700 -49.4% 1.98x
CharIndexing_korean_unicodeScalars_Backwards 337400 172240 -49.0% 1.96x
CharIndexing_punctuated_unicodeScalars_Backwards 76040 39200 -48.4% 1.94x
CharIndexing_russian_unicodeScalars_Backwards 284480 147160 -48.3% 1.93x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 59040 30920 -47.6% 1.91x
CharIndexing_chinese_unicodeScalars_Backwards 257080 134960 -47.5% 1.90x
ExclusivityGlobal 1574 827 -47.5% 1.90x
CharIndexing_ascii_unicodeScalars_Backwards 334920 176040 -47.4% 1.90x
CharIndexing_japanese_unicodeScalars_Backwards 403880 212440 -47.4% 1.90x
CharIndexing_tweet_unicodeScalars_Backwards 655520 346800 -47.1% 1.89x
CharIndexing_utf16_unicodeScalars_Backwards 346000 183160 -47.1% 1.89x
DataAccessBytesMedium 1575 848 -46.2% 1.86x
SubstringFromLongString 81 44 -45.7% 1.84x
DataAccessBytesSmall 1618 879 -45.7% 1.84x
HTTP2StateMachine 1735461 946012 -45.5% 1.83x
StringFromLongWholeSubstring 82 45 -45.1% 1.82x
DataSetCountSmall 1595 891 -44.1% 1.79x
DataMutateBytesSmall 1760 1000 -43.2% 1.76x
StringFromLongWholeSubstringGeneric 91 53 -41.8% 1.72x
NopDeinit 910600 530600 -41.7% 1.72x
DataAppendBytesSmall 1800 1061 -41.1% 1.70x
DataSetCountMedium 1860 1110 -40.3% 1.68x
Radix2CooleyTukeyf 93648 56448 -39.7% 1.66x
NSStringConversion 1986 1233 -37.9% 1.61x
SubstringFromLongStringGeneric 99 62 -37.4% 1.60x
MonteCarloPi 10429625 6535375 -37.3% 1.60x
ArraySubscript 207952 130744 -37.1% 1.59x
Radix2CooleyTukey 101664 64800 -36.3% 1.57x
MonteCarloE 2249960 1440300 -36.0% 1.56x
FloatingPointPrinting_Float_description_small 22464 14580 -35.1% 1.54x
ArrayValueProp4 8856 5795 -34.6% 1.53x
SevenBoom 2162 1439 -33.4% 1.50x (?)
ArrayValueProp3 8844 5892 -33.4% 1.50x
RandomIntegersLCG 44035 29683 -32.6% 1.48x
Set.isDisjoint.Int100 930 630 -32.3% 1.48x
Set.isDisjoint.Int.Empty 741 503 -32.1% 1.47x (?)
Set.subtracting.Box.Empty 151 103 -31.8% 1.47x (?)
Set.isDisjoint.Int50 1165 795 -31.8% 1.47x
Set.subtracting.Empty.Box 117 80 -31.6% 1.46x (?)
Set.isDisjoint.Int25 1207 828 -31.4% 1.46x
Set.isDisjoint.Empty.Box 602 414 -31.2% 1.45x (?)
ExclusivityIndependent 237 163 -31.2% 1.45x
NSStringConversion.Rebridge 643 443 -31.1% 1.45x (?)
Set.isDisjoint.Empty.Int 588 406 -31.0% 1.45x (?)
EqualSubstringSubstringGenericEquatable 120 83 -30.8% 1.45x
OpenClose 2094 1458 -30.4% 1.44x (?)
LessSubstringSubstring 123 86 -30.1% 1.43x
EqualSubstringSubstring 123 86 -30.1% 1.43x
EqualSubstringString 123 86 -30.1% 1.43x
CharacterLiteralsLarge 2065 1451 -29.7% 1.42x
Set.isDisjoint.Box.Empty 752 531 -29.4% 1.42x (?)
LessSubstringSubstringGenericComparable 120 85 -29.2% 1.41x
DataReplaceSmallBuffer 6200 4400 -29.0% 1.41x
EqualStringSubstring 124 88 -29.0% 1.41x
Set.subtracting.Empty.Int 133 95 -28.6% 1.40x (?)
Set.subtracting.Int.Empty 162 117 -27.8% 1.38x (?)
String.data.Empty 105 78 -25.7% 1.35x (?)
RandomDoubleLCG 58340 43404 -25.6% 1.34x
DataToStringSmall 6150 4600 -25.2% 1.34x (?)
DataToStringEmpty 3200 2400 -25.0% 1.33x (?)
String.data.Small 108 81 -25.0% 1.33x (?)
ProtocolDispatch2 12593 9505 -24.5% 1.32x
StringAdder 1433 1089 -24.0% 1.32x
AnyHashableWithAClass 157000 119500 -23.9% 1.31x (?)
DataToStringMedium 9400 7200 -23.4% 1.31x (?)
CharacterLiteralsSmall 2586 1981 -23.4% 1.31x
UTF8Decode_InitDecoding 271 208 -23.2% 1.30x
DataAppendDataSmallToSmall 6740 5180 -23.1% 1.30x (?)
FloatingPointPrinting_Double_description_small 34400 26500 -23.0% 1.30x (?)
DataAppendDataMediumToMedium 6980 5380 -22.9% 1.30x (?)
DataToStringLargeUnicode 11400 8800 -22.8% 1.30x (?)
NSStringConversion.Rebridge.Mutable 1748 1352 -22.7% 1.29x (?)
DataReplaceMedium 6700 5200 -22.4% 1.29x (?)
CreateObjects 3309 2572 -22.3% 1.29x
ArrayLiteral2 3293 2560 -22.3% 1.29x (?)
DataReplaceMediumBuffer 8600 6700 -22.1% 1.28x (?)
DictionaryRemove 27390 21400 -21.9% 1.28x
UTF8Decode_InitFromCustom_contiguous 270 211 -21.9% 1.28x
Set.isDisjoint.Int0 982 768 -21.8% 1.28x
DataReplaceSmall 4600 3600 -21.7% 1.28x (?)
DataAppendBytesMedium 6560 5140 -21.6% 1.28x (?)
DataAppendArray 6500 5100 -21.5% 1.27x (?)
DataAppendDataSmallToMedium 6280 4940 -21.3% 1.27x (?)
DataAppendDataMediumToSmall 6320 4980 -21.2% 1.27x (?)
ArrayOfGenericRef 10960 8640 -21.2% 1.27x (?)
ArrayOfRef 10690 8430 -21.1% 1.27x
PopFrontArrayGeneric 6760 5380 -20.4% 1.26x (?)
NSDictionaryCastToSwift 4000 3190 -20.2% 1.25x (?)
UTF8Decode_InitFromData 247 198 -19.8% 1.25x (?)
UTF8Decode_InitFromBytes 255 205 -19.6% 1.24x (?)
StackPromo 69300 55900 -19.3% 1.24x (?)
RandomIntegersDef 76800 62100 -19.1% 1.24x
DataReset 4200 3400 -19.0% 1.24x (?)
DataMutateBytesMedium 4240 3460 -18.4% 1.23x (?)
SetIntersect 1880 1540 -18.1% 1.22x
SetIsSubsetInt25 256 210 -18.0% 1.22x
FloatingPointPrinting_Float80_description_small 46332 38016 -17.9% 1.22x (?)
Set.subtracting.Seq.Empty.Int 624 512 -17.9% 1.22x (?)
Set.isStrictSubset.Int25 257 211 -17.9% 1.22x
SetIntersectionInt0 187 154 -17.6% 1.21x
ArrayInitFromSlice 651 537 -17.5% 1.21x (?)
Dictionary2 1915 1580 -17.5% 1.21x
Set.isDisjoint.Box25 2395 1982 -17.2% 1.21x
SetIsSubsetInt50 485 402 -17.1% 1.21x
Set.isStrictSubset.Int50 485 402 -17.1% 1.21x
ErrorHandling 4760 3950 -17.0% 1.21x (?)
RandomDoubleDef 92500 76900 -16.9% 1.20x (?)
LuhnAlgoEager 5041 4204 -16.6% 1.20x (?)
SetIsSubsetInt100 851 713 -16.2% 1.19x
DevirtualizeProtocolComposition 8977 7531 -16.1% 1.19x
NSStringConversion.Rebridge.Long 349 293 -16.0% 1.19x (?)
NSStringConversion.Rebridge.Medium 349 294 -15.8% 1.19x (?)
Walsh 9365 7923 -15.4% 1.18x
Set.subtracting.Seq.Empty.Box 638 541 -15.2% 1.18x (?)
DictionaryBridgeToObjC_Bridge 33 28 -15.2% 1.18x (?)
StringInterpolationSmall 4680 3990 -14.7% 1.17x (?)
ArrayValueProp 5211 4467 -14.3% 1.17x (?)
DictionarySwapAt 5168 4436 -14.2% 1.17x (?)
DictionaryRemoveOfObjects 55600 47800 -14.0% 1.16x
LuhnAlgoLazy 5051 4353 -13.8% 1.16x (?)
RangeReplaceableCollectionPlusDefault 7116 6220 -12.6% 1.14x (?)
StringInterpolation 14700 12900 -12.2% 1.14x (?)
Set.subtracting.Seq.Int.Empty 913 802 -12.2% 1.14x (?)
DictionaryCompactMapValuesOfCastValue 56322 49788 -11.6% 1.13x
NibbleSort 709980 629690 -11.3% 1.13x
HashTest 13560 12030 -11.3% 1.13x (?)
DictionarySwap 6412 5700 -11.1% 1.12x (?)
NSStringConversion.MutableCopy.Rebridge.Long 1506 1339 -11.1% 1.12x (?)
ArrayValueProp2 6891 6164 -10.5% 1.12x (?)
Set.isDisjoint.Box0 2702 2421 -10.4% 1.12x (?)
DataCreateSmall 87160 78310 -10.2% 1.11x
SetIntersectionInt25 394 354 -10.2% 1.11x
StringBuilder 3024 2719 -10.1% 1.11x (?)
Sim2DArray 15766 14180 -10.1% 1.11x
Set.subtracting.Seq.Box.Empty 911 821 -9.9% 1.11x (?)
StringUTF16Builder 3100 2800 -9.7% 1.11x (?)
ObjectiveCBridgeFromNSArrayAnyObject 27300 24700 -9.5% 1.11x (?)
CharacterPropertiesStashedMemo 3720 3370 -9.4% 1.10x (?)
ReversedBidirectional 108674 98929 -9.0% 1.10x (?)
StringBuilderSmallReservingCapacity 3024 2762 -8.7% 1.09x (?)
CStringLongNonAscii 416 380 -8.7% 1.09x (?)
StrToInt 42890 39240 -8.5% 1.09x (?)
Dictionary2OfObjects 4420 4050 -8.4% 1.09x (?)
SetIsSubsetBox25 846 776 -8.3% 1.09x (?)
Set.isStrictSubset.Box25 845 778 -7.9% 1.09x (?)
SetIsSubsetInt0 651 600 -7.8% 1.08x (?)
SetIntersectionInt50 566 523 -7.6% 1.08x
SetSymmetricDifferenceInt50 661 611 -7.6% 1.08x
SetSymmetricDifferenceInt100 622 575 -7.6% 1.08x (?)
SetIntersectionBox0 559 517 -7.5% 1.08x (?)
SetSymmetricDifferenceInt25 690 639 -7.4% 1.08x (?)
Set.isStrictSubset.Int0 670 621 -7.3% 1.08x (?)
DictionaryBridgeToObjC_BulkAccess 197 183 -7.1% 1.08x (?)
IndexPath.Subscript.Mutation 479 445 -7.1% 1.08x (?)
DataAppendDataLargeToLarge 64600 60200 -6.8% 1.07x (?)
CharacterPropertiesPrecomputed 3200 2990 -6.6% 1.07x (?)

Code size: -swiftlibs

Improvement OLD NEW DELTA RATIO
libswiftSwiftOnoneSupport.dylib 163840 147456 -10.0% 1.11x
libswiftCore.dylib 3932160 3719168 -5.4% 1.06x
libswiftFoundation.dylib 1343488 1310720 -2.4% 1.02x
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

@gottesmm
Copy link
Contributor Author

I started to look at Breadcrumbs. I think @_specialize may be broken.

@gottesmm
Copy link
Contributor Author

Debug source compat failed due to Jenkins error

@gottesmm
Copy link
Contributor Author

preset=buildbot,tools=RA,stdlib=RD,test=non_executable
@swift-ci Please test with preset macOS

@gottesmm
Copy link
Contributor Author

Testing non-executable macOS as well

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - b2c5f8579abe1baa0252fcdb2f671d4155076dc4

@gottesmm
Copy link
Contributor Author

@swift-ci test linux platform

@gottesmm
Copy link
Contributor Author

@swift-ci test source compatibility

@gottesmm
Copy link
Contributor Author

@swift-ci asan test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - b2c5f8579abe1baa0252fcdb2f671d4155076dc4

@swift-ci
Copy link
Contributor

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - b2c5f8579abe1baa0252fcdb2f671d4155076dc4

Install command
tar zxf swift-PR-35872-551-ubuntu16.04.tar.gz
More info

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - b2c5f8579abe1baa0252fcdb2f671d4155076dc4

@gottesmm
Copy link
Contributor Author

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 81a4ccc60ec6c59f490a9afbc6b84683f3a6af04

@gottesmm
Copy link
Contributor Author

windows test failure is being fixed by compnerd on another PR. Not from this PR.

@gottesmm
Copy link
Contributor Author

Woot! Linux succeeded! Not surprised that it would though (I am not enabling this on Linux in this PR).

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 811938787ce424923f3f86c22bef5e082633ff02

@gottesmm
Copy link
Contributor Author

Funny story, I actually need to check in: swiftlang/llvm-project#2483

@gottesmm
Copy link
Contributor Author

gottesmm commented Feb 13, 2021

EDIT MG: This is the job that succeeded with the full test.
swiftlang/llvm-project#2483

@swift-ci test macOS platform

@gottesmm
Copy link
Contributor Author

@swift-ci test windows platform

@gottesmm
Copy link
Contributor Author

... Erik merged something and created a merge conflict ... And the merge conflict was just an include line...

I am going to smoke test this in since I did a full test.

gottesmm and others added 11 commits February 12, 2021 23:18
… ossa/non-ossa SIL.

In SILCombine, we do not want to add or delete edges. We are ok with swapping
edges or replacing edges when the CFG structure is preserved. This becomes an
issue since by performing this optimization, we are going to get rid of the
error parameter but leave a try_apply, breaking SIL invariants. So to do perform
this optimization, we would need to convert to an apply and eliminate the error
edge, breaking the aforementioned SILCombine invariant. So, just do not perform
this for now and leave it to other passes like SimplifyCFG.
…ths where there is dynamically no value by inserting compensating destroys.

This commit is fixing two things:

1. In certain cases, we are seeing cases where either SILGen or the optimizer
are eliminating destroy_addr along paths where we know that an enum is
dynamically trivial. This can not be expressed in OSSA, so I added code to
pred-deadalloc-elim so that I check if any of our available values after we
finish promoting away an allocation now need to have their consuming use set
completed.

2. That led me to discover that in certain cases load [take] that we were
promoting were available values of other load [take]. This means that we have a
memory safety issue if we promote one load before the other. Consider the
following SIL:

```
%mem = alloc_stack
store %arg to [init] %mem
%0 = load [take] %mem
store %0 to [init] %mem
%1 = load [take] %mem
destroy_value %1
dealloc_stack %mem
```

In this case, if we eliminate %0 before we eliminate %1, we will have a stale
pointer to %0.

I also took this as an opportunity to turn off predictable mem access opt on SIL
that was deserialized canonicalized and non-OSSA SIL. We evidently need to still
do this for pred mem opts for perf reasons (not sure why). But I am pretty sure
this isn't needed and allows me to avoid some nasty code.
…complete available value when cleaning up takes.
While looking at the performance of the verifier running with -sil-verify-all on
the stdlib, I noticed that we are spending ~30% of the total time in the
verifier performing this check. Introducing the cache mitigates this issue.

I believe the reason is that we were walking for each operand the use list of
its associated value which I think is quadratic.
…br that do not involve objects directly.

Just to reduce the size of the CFG.
…dress through the phi using a RawPointer.

In OSSA, we do not allow for address phis, but in certain cases the logic of
LoopRotate really wants them. To work around this issue, I added some code in
this PR to loop rotate that as a post-pass fixes up any address phis by
inserting address <-> raw pointer adapters and changing the address phi to
instead be of raw pointer type.
…that have at least one enum tuple sub-elt.

Just until MemoryLifetime can handle enums completely.
…passes.

This eliminates some regressions by eliminating phase ordering in between
ARCSequenceOpts/inlining with read only functions whose read onlyness is lost
after inlining.
LLVM seems to not support this today. With ownership SSA, we now produce these
for accelerate for some reason, causing lldb/TestAccelerateSIMD.py to fail. I
debugged this with Adrian and we got this fix. I filed the radar below against
Adrian to fix.

rdar://74287800
There is some sort of ASAN issue that this exposes on Linux, so I am going to do
this on Darwin and then debug the Linux issue using ASAN over the weekend/next
week.
@gottesmm gottesmm force-pushed the ossa-serialize-then-lower-ownership branch from 8119387 to dd6439d Compare February 13, 2021 07:20
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test and merge

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

This looks identical to the one I reviewed:
#35958

@gottesmm
Copy link
Contributor Author

It is identical except in the other one I tweaked the triple conditional to be isMacOS instead of this PR which is isDarwin.

@atrick
Copy link
Contributor

atrick commented Feb 13, 2021

@eeckstein The fix for the (String) Breadcrumbs benchmark regression is pending. rdar://74296355 (OSSA benchmark regression; Breadcrumbs.MutatedUTF16ToIdx 4x slower)

We also fixed the NSStringConversion regressions. It think it was Meghana's pipeline change that fixed it.

Benchmark data with fixes:
#35942

I think there are still a few significant regressions at -Osize that don't show up at -O, so that's inlining related.

@swift-ci swift-ci merged commit 2259db2 into swiftlang:main Feb 13, 2021
@gottesmm gottesmm deleted the ossa-serialize-then-lower-ownership branch February 13, 2021 11:32
@atrick
Copy link
Contributor

atrick commented Feb 13, 2021

@gottesmm @meg-gupta 👏 👏 👏 So great to see this landing!

@drodriguez
Copy link
Contributor

I am trying to find clues about some breakage in the Android ARMv7 CI from yesterday.

The test that broke is SILOptimizer/dead_array_elim.swift. The PR that started making it fail is #36118, which enables the test, which was disabled #35978. This PR landed while the test was disabled, and that's why I think it wasn't noticed until now. Before that, the test broke once before in a similar way in #35737, but was fixed in #35776 (/cc @eeckstein).

I tried bisecting the problem (carefully enabling the test) and I end up in the commits of #36025, which enables this for non-Darwin platforms. Then I tested again these changes and the test pass when SerializeStdlibWithOwnershipWithOpts is false, but not when it is true. Before these changes the test doesn't fail.

I tried comparing the previous solution in #35776 with the code introduced here, but I don't clearly see where the same solution might be possible (it might just be a red herring).

I was wondering if someone has any idea of what might be going wrong and if it can be fixed.

Thanks!

drodriguez added a commit to drodriguez/swift that referenced this pull request Feb 27, 2021
It is failing for unknown reasons, probably as a result of swiftlang#35872.
XFAILing for the time being to have a green build again.
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.

6 participants