Skip to content
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

Enable the CopyPropagation pass. #35242

Merged
merged 1 commit into from
Jan 17, 2021
Merged

Enable the CopyPropagation pass. #35242

merged 1 commit into from
Jan 17, 2021

Conversation

atrick
Copy link
Member

@atrick atrick commented Dec 30, 2020

For now simply run the pass before SemanticARCOpts. This will probably
be called as a utility from within SemanticARCOpts so it can be
iteratively applied after other ARC-related transformations.

This is rebased on top of the CanonicalOSSA utility:
#35241

And depends on a _StringObject.init fix:
#35243

@atrick
Copy link
Member Author

atrick commented Dec 30, 2020

@swift-ci test

@atrick
Copy link
Member Author

atrick commented Dec 30, 2020

@swift-ci benchmark

@atrick
Copy link
Member Author

atrick commented Dec 30, 2020

@swift-ci test source compatibility

@swift-ci
Copy link
Collaborator

Performance: -O

Regression OLD NEW DELTA RATIO
LessSubstringSubstring 39 42 +7.7% 0.93x (?)
EqualSubstringSubstring 39 42 +7.7% 0.93x (?)
EqualSubstringString 39 42 +7.7% 0.93x (?)
LessSubstringSubstringGenericComparable 39 42 +7.7% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
Set.subtracting.Seq.Int.Empty 237 142 -40.1% 1.67x
Set.subtracting.Int.Empty 56 39 -30.4% 1.44x
Set.subtracting.Seq.Empty.Box 191 138 -27.7% 1.38x
Set.subtracting.Seq.Box.Empty 274 200 -27.0% 1.37x
Set.subtracting.Seq.Empty.Int 185 136 -26.5% 1.36x
Set.subtracting.Empty.Int 36 27 -25.0% 1.33x
ParseInt.UInt64.Decimal 237 199 -16.0% 1.19x
ParseInt.IntSmall.UncommonRadix 470 401 -14.7% 1.17x
StrToInt 1470 1260 -14.3% 1.17x (?)
ParseInt.IntSmall.Decimal 420 361 -14.0% 1.16x (?)
DataAppendArray 4600 4100 -10.9% 1.12x (?)
FlattenListFlatMap 4422 3956 -10.5% 1.12x (?)
ParseInt.UIntSmall.Binary 778 703 -9.6% 1.11x
ParseInt.UInt64.Hex 356 325 -8.7% 1.10x (?)
Histogram 522 478 -8.4% 1.09x (?)
DictionarySwapOfObjects 8440 7800 -7.6% 1.08x (?)
IndexPath.Subscript.Mutation 464 430 -7.3% 1.08x (?)
String.replaceSubrange.ArrChar.Small 74 69 -6.8% 1.07x (?)

Code size: -O

Regression OLD NEW DELTA RATIO
FloatingPointParsing.o 17986 18546 +3.1% 0.97x
NSDictionaryCastToSwift.o 1482 1514 +2.2% 0.98x
StringMatch.o 4186 4234 +1.1% 0.99x
 
Improvement OLD NEW DELTA RATIO
Histogram.o 3134 2952 -5.8% 1.06x
DiffingMyers.o 6661 6533 -1.9% 1.02x
StringEdits.o 9937 9761 -1.8% 1.02x
RGBHistogram.o 21390 21054 -1.6% 1.02x
DictionaryOfAnyHashableStrings.o 8040 7928 -1.4% 1.01x
AngryPhonebook.o 9219 9098 -1.3% 1.01x

Performance: -Osize

Regression OLD NEW DELTA RATIO
Data.init.Sequence.64kB.Count.I 39 51 +30.8% 0.76x
Data.init.Sequence.64kB.Count 39 51 +30.8% 0.76x
Data.init.Sequence.2047B.Count.I 72 93 +29.2% 0.77x
Data.init.Sequence.2049B.Count.I 73 93 +27.4% 0.78x
Data.init.Sequence.809B.Count.I 73 91 +24.7% 0.80x
Data.init.Sequence.809B.Count 73 90 +23.3% 0.81x
Data.init.Sequence.511B.Count.I 89 108 +21.3% 0.82x (?)
Data.init.Sequence.513B.Count.I 90 108 +20.0% 0.83x (?)
ArrayAppendAsciiSubstring 29124 31968 +9.8% 0.91x
ArrayAppendLatin1Substring 29736 32616 +9.7% 0.91x (?)
DataCountMedium 31 34 +9.7% 0.91x
LessSubstringSubstring 39 42 +7.7% 0.93x
EqualSubstringSubstring 39 42 +7.7% 0.93x (?)
EqualStringSubstring 39 42 +7.7% 0.93x (?)
EqualSubstringSubstringGenericEquatable 39 42 +7.7% 0.93x
EqualSubstringString 39 42 +7.7% 0.93x (?)
LessSubstringSubstringGenericComparable 39 42 +7.7% 0.93x
ArrayAppendUTF16Substring 29124 31320 +7.5% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
Set.subtracting.Seq.Int.Empty 236 140 -40.7% 1.69x
Set.subtracting.Int.Empty 56 39 -30.4% 1.44x
Set.subtracting.Seq.Box.Empty 274 195 -28.8% 1.41x
Set.subtracting.Seq.Empty.Box 193 138 -28.5% 1.40x
Set.subtracting.Empty.Int 37 27 -27.0% 1.37x
Set.subtracting.Seq.Empty.Int 185 136 -26.5% 1.36x
NSError 229 170 -25.8% 1.35x (?)
ParseInt.UInt64.Decimal 252 206 -18.3% 1.22x
ParseInt.IntSmall.Decimal 468 391 -16.5% 1.20x
StrToInt 1630 1400 -14.1% 1.16x
ParseInt.UInt64.Hex 391 345 -11.8% 1.13x
ParseInt.IntSmall.UncommonRadix 483 432 -10.6% 1.12x
FloatingPointPrinting_Float80_interpolated 60400 54800 -9.3% 1.10x (?)
Histogram 537 488 -9.1% 1.10x
ParseInt.UIntSmall.Binary 775 708 -8.6% 1.09x (?)
DataSubscriptMedium 74 68 -8.1% 1.09x
DataAppendBytesMedium 4760 4380 -8.0% 1.09x (?)
ReversedDictionary2 342 315 -7.9% 1.09x
Data.append.Sequence.809B.Count.RE.I 114 105 -7.9% 1.09x (?)
IndexPath.Subscript.Mutation 464 429 -7.5% 1.08x (?)
FloatingPointPrinting_Double_interpolated 53200 49400 -7.1% 1.08x (?)
DictionarySwapOfObjects 8400 7840 -6.7% 1.07x (?)

Code size: -Osize

Regression OLD NEW DELTA RATIO
StringMatch.o 4027 4107 +2.0% 0.98x
NSDictionaryCastToSwift.o 1412 1436 +1.7% 0.98x
FloatingPointParsing.o 17088 17292 +1.2% 0.99x
 
Improvement OLD NEW DELTA RATIO
Histogram.o 2530 2336 -7.7% 1.08x
DictTest3.o 13395 13151 -1.8% 1.02x
RGBHistogram.o 20445 20102 -1.7% 1.02x
DictTest.o 12031 11831 -1.7% 1.02x
RomanNumbers.o 5406 5325 -1.5% 1.02x
IntegerParsing.o 52180 51516 -1.3% 1.01x
DictionaryOfAnyHashableStrings.o 6466 6385 -1.3% 1.01x
StringEdits.o 9986 9871 -1.2% 1.01x
DiffingMyers.o 6462 6395 -1.0% 1.01x

Performance: -Onone

Regression OLD NEW DELTA RATIO
CharIteration_tweet_unicodeScalars_Backwards 288640 359160 +24.4% 0.80x (?)
CharIteration_chinese_unicodeScalars_Backwards 113440 140840 +24.2% 0.81x (?)
CharIteration_russian_unicodeScalars_Backwards 124520 154440 +24.0% 0.81x (?)
CharIteration_ascii_unicodeScalars_Backwards 146120 181200 +24.0% 0.81x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 26840 33280 +24.0% 0.81x (?)
CharIteration_korean_unicodeScalars_Backwards 146440 181480 +23.9% 0.81x (?)
CharIteration_japanese_unicodeScalars_Backwards 179160 221720 +23.8% 0.81x (?)
CharIteration_punctuated_unicodeScalars_Backwards 34320 41600 +21.2% 0.83x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 58960 68600 +16.4% 0.86x (?)
CharIndexing_korean_unicodeScalars_Backwards 332680 386760 +16.3% 0.86x (?)
CharIteration_utf16_unicodeScalars_Backwards 143720 166320 +15.7% 0.86x (?)
CharIndexing_russian_unicodeScalars_Backwards 284600 328560 +15.4% 0.87x (?)
CharIndexing_chinese_unicodeScalars_Backwards 257640 297240 +15.4% 0.87x (?)
CharIndexing_japanese_unicodeScalars_Backwards 408520 470960 +15.3% 0.87x (?)
CharIndexing_tweet_unicodeScalars_Backwards 665440 765840 +15.1% 0.87x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 75560 86840 +14.9% 0.87x (?)
CharIndexing_ascii_unicodeScalars_Backwards 336520 386320 +14.8% 0.87x (?)
CStringLongAscii 381 429 +12.6% 0.89x (?)
StringBuilderWithLongSubstring 5270 5840 +10.8% 0.90x (?)
Dictionary2 1850 1995 +7.8% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
Set.subtracting.Empty.Box 128 114 -10.9% 1.12x (?)
Set.subtracting.Empty.Int 145 131 -9.7% 1.11x (?)
Set.subtracting.Int.Empty 178 163 -8.4% 1.09x (?)
Set.subtracting.Seq.Empty.Int 677 622 -8.1% 1.09x (?)
Set.subtracting.Box.Empty 165 152 -7.9% 1.09x (?)
Set.subtracting.Seq.Int.Empty 970 895 -7.7% 1.08x (?)
Dict.CopyKeyValue.24k 6688 6199 -7.3% 1.08x (?)
Dict.CopyKeyValue.20k 5745 5331 -7.2% 1.08x (?)
Set.subtracting.Seq.Empty.Box 696 647 -7.0% 1.08x (?)
Dict.CopyKeyValue.16k 4864 4525 -7.0% 1.07x (?)

Code size: -swiftlibs

Improvement OLD NEW DELTA RATIO
libswiftStdlibUnittest.dylib 327680 311296 -5.0% 1.05x
libswiftFoundation.dylib 1359872 1343488 -1.2% 1.01x
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
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - 39cbc76980219c08fc4c4ffd37c3f52bc22bdbb9

@swift-ci
Copy link
Collaborator

Build failed
Swift Test OS X Platform
Git Sha - 39cbc76980219c08fc4c4ffd37c3f52bc22bdbb9

@atrick
Copy link
Member Author

atrick commented Dec 31, 2020

This passed SCK release testing. ReactiveCocoa fails on main!

This passed regular CI testing. The only lit failure is an AutoDiff check that appeared after rebasing.

//===----------------------------------------------------------------------===//
///
/// Canonicalize the copies and destroys of a single owned or guaranteed OSSA
/// value.
Copy link
Member

Choose a reason for hiding this comment

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

It would be very helpful to explain what "canonicalize" means here, ideally with some SIL examples.

Copy link
Member Author

Choose a reason for hiding this comment

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

I moved the extensive comments into the header file.

include/swift/SILOptimizer/Utils/CanonicalOSSALifetime.h Outdated Show resolved Hide resolved
@atrick atrick force-pushed the copyprop branch 3 times, most recently from da92545 to 3a06e75 Compare January 6, 2021 07:09
@atrick
Copy link
Member Author

atrick commented Jan 6, 2021

@swift-ci test

@atrick
Copy link
Member Author

atrick commented Jan 6, 2021

@swift-ci test source compatibility

@atrick
Copy link
Member Author

atrick commented Jan 6, 2021

@swift-ci benchmark

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 6, 2021

Build failed before running benchmark.

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 6, 2021

Build failed
Swift Test Linux Platform
Git Sha - 3a06e75806a01c14217d167296d2b7f230e45a9d

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 6, 2021

Build failed
Swift Test OS X Platform
Git Sha - 3a06e75806a01c14217d167296d2b7f230e45a9d

@atrick
Copy link
Member Author

atrick commented Jan 6, 2021

@swift-ci benchmark

@atrick
Copy link
Member Author

atrick commented Jan 6, 2021

The SCK ReactiveCocoa failure is a known issue that's been fixed independently.

@atrick
Copy link
Member Author

atrick commented Jan 6, 2021

@swift-ci test

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 6, 2021

Performance: -O

Regression OLD NEW DELTA RATIO
UTF8Decode_InitFromCustom_noncontiguous 459 509 +10.9% 0.90x
DataSetCountSmall 131 142 +8.4% 0.92x (?)
LessSubstringSubstring 39 42 +7.7% 0.93x (?)
EqualSubstringSubstring 39 42 +7.7% 0.93x (?)
EqualSubstringString 39 42 +7.7% 0.93x (?)
LessSubstringSubstringGenericComparable 39 42 +7.7% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
Set.subtracting.Seq.Int.Empty 237 142 -40.1% 1.67x
FlattenListLoop 2510 1643 -34.5% 1.53x (?)
Set.subtracting.Int.Empty 56 39 -30.4% 1.44x
Set.subtracting.Seq.Empty.Box 191 138 -27.7% 1.38x
Set.subtracting.Seq.Box.Empty 274 200 -27.0% 1.37x
Set.subtracting.Seq.Empty.Int 184 136 -26.1% 1.35x
Set.subtracting.Empty.Int 36 27 -25.0% 1.33x
FlattenListFlatMap 6639 4986 -24.9% 1.33x (?)
ParseInt.UInt64.Decimal 237 199 -16.0% 1.19x
StrToInt 1490 1260 -15.4% 1.18x
ParseInt.IntSmall.UncommonRadix 469 399 -14.9% 1.18x
ParseInt.IntSmall.Decimal 420 361 -14.0% 1.16x (?)
Data.hash.Empty 77 68 -11.7% 1.13x
StringBuilderWithLongSubstring 1790 1590 -11.2% 1.13x (?)
StringBuilderLong 1510 1360 -9.9% 1.11x (?)
ParseInt.UIntSmall.Binary 777 703 -9.5% 1.11x (?)
Histogram 523 478 -8.6% 1.09x (?)
DictionarySwapOfObjects 8520 7800 -8.5% 1.09x (?)
ParseInt.UInt64.Hex 355 326 -8.2% 1.09x (?)
IndexPath.Subscript.Mutation 464 428 -7.8% 1.08x (?)
FloatingPointPrinting_Float80_interpolated 59400 54800 -7.7% 1.08x (?)
DataAppendDataSmallToMedium 4500 4160 -7.6% 1.08x (?)
FloatingPointPrinting_Double_interpolated 53200 49600 -6.8% 1.07x (?)
String.replaceSubrange.ArrChar.Small 74 69 -6.8% 1.07x (?)

Code size: -O

Regression OLD NEW DELTA RATIO
FloatingPointParsing.o 17986 18546 +3.1% 0.97x
NSDictionaryCastToSwift.o 1482 1514 +2.2% 0.98x
StringMatch.o 4186 4234 +1.1% 0.99x
 
Improvement OLD NEW DELTA RATIO
Histogram.o 3134 2952 -5.8% 1.06x
DiffingMyers.o 6661 6533 -1.9% 1.02x
StringEdits.o 9937 9761 -1.8% 1.02x
RGBHistogram.o 21390 21054 -1.6% 1.02x
DictionaryOfAnyHashableStrings.o 8040 7928 -1.4% 1.01x
AngryPhonebook.o 9219 9098 -1.3% 1.01x

Performance: -Osize

Regression OLD NEW DELTA RATIO
DataSetCountSmall 131 145 +10.7% 0.90x
DataCountMedium 31 34 +9.7% 0.91x
ArrayAppendUTF16Substring 29196 31968 +9.5% 0.91x (?)
ArrayAppendAsciiSubstring 29196 31968 +9.5% 0.91x (?)
ArrayAppendLatin1Substring 29772 32544 +9.3% 0.91x (?)
LessSubstringSubstring 39 42 +7.7% 0.93x (?)
EqualSubstringSubstring 39 42 +7.7% 0.93x
EqualStringSubstring 39 42 +7.7% 0.93x
EqualSubstringSubstringGenericEquatable 39 42 +7.7% 0.93x (?)
EqualSubstringString 39 42 +7.7% 0.93x
LessSubstringSubstringGenericComparable 39 42 +7.7% 0.93x
 
Improvement OLD NEW DELTA RATIO
Set.subtracting.Seq.Int.Empty 236 140 -40.7% 1.69x
FlattenListFlatMap 5796 3932 -32.2% 1.47x (?)
Set.subtracting.Int.Empty 56 39 -30.4% 1.44x
Set.subtracting.Seq.Empty.Box 197 138 -29.9% 1.43x
Set.subtracting.Empty.Int 38 27 -28.9% 1.41x
Set.subtracting.Seq.Empty.Int 189 137 -27.5% 1.38x
Set.subtracting.Seq.Box.Empty 273 200 -26.7% 1.36x
NSError 229 171 -25.3% 1.34x (?)
ParseInt.UInt64.Decimal 252 205 -18.7% 1.23x
ParseInt.IntSmall.Decimal 468 398 -15.0% 1.18x
FlattenListLoop 1884 1630 -13.5% 1.16x (?)
StrToInt 1630 1420 -12.9% 1.15x
DataAppendArray 4700 4100 -12.8% 1.15x (?)
ParseInt.UInt64.Hex 391 344 -12.0% 1.14x
Data.hash.Empty 80 71 -11.2% 1.13x (?)
StringToDataEmpty 900 800 -11.1% 1.12x (?)
DataAppendDataSmallToMedium 4760 4280 -10.1% 1.11x (?)
DataAppendBytesMedium 4580 4120 -10.0% 1.11x (?)
DataAppendSequence 11400 10300 -9.6% 1.11x (?)
Histogram 537 488 -9.1% 1.10x (?)
ParseInt.IntSmall.UncommonRadix 483 439 -9.1% 1.10x (?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 4940 4520 -8.5% 1.09x (?)
ParseInt.UIntSmall.Binary 775 710 -8.4% 1.09x (?)
Data.append.Sequence.809B.Count.RE 111 102 -8.1% 1.09x (?)
Data.append.Sequence.809B.Count.RE.I 111 102 -8.1% 1.09x (?)
DataSubscriptMedium 74 68 -8.1% 1.09x (?)
IndexPath.Subscript.Mutation 466 429 -7.9% 1.09x (?)
ReversedDictionary2 342 315 -7.9% 1.09x
StrComplexWalk 5160 4790 -7.2% 1.08x (?)

Code size: -Osize

Regression OLD NEW DELTA RATIO
StringMatch.o 4027 4107 +2.0% 0.98x
NSDictionaryCastToSwift.o 1412 1436 +1.7% 0.98x
FloatingPointParsing.o 17088 17292 +1.2% 0.99x
 
Improvement OLD NEW DELTA RATIO
Histogram.o 2530 2336 -7.7% 1.08x
DictTest3.o 13395 13151 -1.8% 1.02x
RGBHistogram.o 20445 20102 -1.7% 1.02x
DictTest.o 12031 11831 -1.7% 1.02x
RomanNumbers.o 5406 5325 -1.5% 1.02x
IntegerParsing.o 52180 51516 -1.3% 1.01x
DictionaryOfAnyHashableStrings.o 6466 6385 -1.3% 1.01x
StringEdits.o 9986 9871 -1.2% 1.01x
DiffingMyers.o 6462 6395 -1.0% 1.01x

Performance: -Onone

Regression OLD NEW DELTA RATIO
CharIteration_japanese_unicodeScalars_Backwards 179080 223800 +25.0% 0.80x
CharIteration_ascii_unicodeScalars_Backwards 146400 182840 +24.9% 0.80x
CharIteration_korean_unicodeScalars_Backwards 146600 182680 +24.6% 0.80x (?)
CharIteration_russian_unicodeScalars_Backwards 124560 154960 +24.4% 0.80x
CharIteration_tweet_unicodeScalars_Backwards 288680 359040 +24.4% 0.80x
CharIteration_chinese_unicodeScalars_Backwards 113600 141280 +24.4% 0.80x
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 26880 33360 +24.1% 0.81x
CharIteration_punctuated_unicodeScalars_Backwards 34360 41840 +21.8% 0.82x (?)
StringToDataMedium 8300 9900 +19.3% 0.84x (?)
CharIndexing_korean_unicodeScalars_Backwards 335000 396560 +18.4% 0.84x (?)
CharIteration_utf16_unicodeScalars_Backwards 143840 168760 +17.3% 0.85x
CharIndexing_russian_unicodeScalars_Backwards 284000 331920 +16.9% 0.86x (?)
CharIndexing_chinese_unicodeScalars_Backwards 258920 299560 +15.7% 0.86x (?)
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 59760 68160 +14.1% 0.88x (?)
CharIndexing_japanese_unicodeScalars_Backwards 410720 466240 +13.5% 0.88x (?)
CharIndexing_punctuated_unicodeScalars_Backwards 76200 86240 +13.2% 0.88x (?)
CStringLongNonAscii 372 421 +13.2% 0.88x (?)
String.data.Small 93 105 +12.9% 0.89x (?)
CStringLongAscii 382 431 +12.8% 0.89x (?)
CharIndexing_ascii_unicodeScalars_Backwards 338040 381040 +12.7% 0.89x (?)
CharIndexing_tweet_unicodeScalars_Backwards 672720 755080 +12.2% 0.89x (?)
DataCreateMediumArray 7360 8220 +11.7% 0.90x (?)
String.data.Empty 91 99 +8.8% 0.92x (?)
CharIndexing_utf16_unicodeScalars_Backwards 343840 373680 +8.7% 0.92x (?)
 
Improvement OLD NEW DELTA RATIO
Set.subtracting.Empty.Box 129 114 -11.6% 1.13x
Set.subtracting.Empty.Int 145 132 -9.0% 1.10x (?)
Set.subtracting.Seq.Empty.Box 700 640 -8.6% 1.09x
Set.subtracting.Box.Empty 164 150 -8.5% 1.09x (?)
Dict.CopyKeyValue.24k 6710 6164 -8.1% 1.09x (?)
Dict.CopyKeyValue.20k 5761 5299 -8.0% 1.09x (?)
Set.subtracting.Int.Empty 177 163 -7.9% 1.09x (?)
Dict.CopyKeyValue.16k 4879 4502 -7.7% 1.08x (?)
Set.subtracting.Seq.Empty.Int 674 623 -7.6% 1.08x (?)
Dict.CopyKeyValue.28k 9014 8358 -7.3% 1.08x (?)

Code size: -swiftlibs

Improvement OLD NEW DELTA RATIO
libswiftStdlibUnittest.dylib 327680 311296 -5.0% 1.05x
libswiftFoundation.dylib 1359872 1343488 -1.2% 1.01x
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
Collaborator

swift-ci commented Jan 6, 2021

Build failed
Swift Test Linux Platform
Git Sha - 3a06e75806a01c14217d167296d2b7f230e45a9d

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 6, 2021

Build failed
Swift Test OS X Platform
Git Sha - 3a06e75806a01c14217d167296d2b7f230e45a9d

@atrick
Copy link
Member Author

atrick commented Jan 10, 2021

@swift-ci test

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - f13e1593960785e2bfba5d173da98b5a9596733e

@swift-ci
Copy link
Collaborator

Build failed
Swift Test OS X Platform
Git Sha - f13e1593960785e2bfba5d173da98b5a9596733e

@atrick
Copy link
Member Author

atrick commented Jan 10, 2021

@swift-ci test

@swift-ci
Copy link
Collaborator

Build failed
Swift Test Linux Platform
Git Sha - f13e1593960785e2bfba5d173da98b5a9596733e

@swift-ci
Copy link
Collaborator

Build failed
Swift Test OS X Platform
Git Sha - f13e1593960785e2bfba5d173da98b5a9596733e

@gottesmm
Copy link
Member

@swift-ci test

@atrick
Copy link
Member Author

atrick commented Jan 16, 2021

@swift-ci test

@atrick
Copy link
Member Author

atrick commented Jan 16, 2021

@swift-ci test source compatibility

@atrick
Copy link
Member Author

atrick commented Jan 16, 2021

@swift-ci benchmark

@swift-ci
Copy link
Collaborator

Performance: -O

Regression OLD NEW DELTA RATIO
DictionaryBridgeToObjC_Access 745 821 +10.2% 0.91x (?)
LessSubstringSubstring 35 38 +8.6% 0.92x (?)
EqualSubstringSubstring 35 38 +8.6% 0.92x (?)
EqualSubstringString 35 38 +8.6% 0.92x (?)
LessSubstringSubstringGenericComparable 35 38 +8.6% 0.92x (?)
 
Improvement OLD NEW DELTA RATIO
Set.subtracting.Seq.Int.Empty 214 127 -40.7% 1.69x (?)
Set.subtracting.Int.Empty 50 34 -32.0% 1.47x
Set.subtracting.Seq.Box.Empty 246 176 -28.5% 1.40x
Set.subtracting.Seq.Empty.Box 170 125 -26.5% 1.36x
Set.subtracting.Seq.Empty.Int 166 123 -25.9% 1.35x (?)
Set.subtracting.Empty.Int 32 24 -25.0% 1.33x
StrToInt 1350 1130 -16.3% 1.19x
ParseInt.UInt64.Decimal 212 178 -16.0% 1.19x
ParseInt.IntSmall.UncommonRadix 422 358 -15.2% 1.18x
ParseInt.IntSmall.Decimal 376 324 -13.8% 1.16x
String.data.Medium 105 93 -11.4% 1.13x (?)
StringToDataSmall 900 800 -11.1% 1.12x (?)
ParseInt.UInt64.Hex 322 290 -9.9% 1.11x
ParseInt.UIntSmall.Binary 697 631 -9.5% 1.10x
Histogram 469 425 -9.4% 1.10x (?)
DictionarySwapOfObjects 7640 7000 -8.4% 1.09x (?)
IndexPath.Subscript.Mutation 417 384 -7.9% 1.09x
DataAppendArray 4000 3700 -7.5% 1.08x (?)
DataAppendDataSmallToMedium 4200 3900 -7.1% 1.08x (?)
StringToDataEmpty 750 700 -6.7% 1.07x (?)
DictionaryBridgeToObjC_Bridge 15 14 -6.7% 1.07x (?)

Code size: -O

Regression OLD NEW DELTA RATIO
FloatingPointParsing.o 17986 18546 +3.1% 0.97x
NSDictionaryCastToSwift.o 1482 1514 +2.2% 0.98x
StringMatch.o 4186 4234 +1.1% 0.99x
 
Improvement OLD NEW DELTA RATIO
Histogram.o 3134 2952 -5.8% 1.06x
DiffingMyers.o 6661 6533 -1.9% 1.02x
StringEdits.o 9937 9761 -1.8% 1.02x
RGBHistogram.o 21374 21054 -1.5% 1.02x
DictionaryOfAnyHashableStrings.o 8040 7928 -1.4% 1.01x
AngryPhonebook.o 9219 9098 -1.3% 1.01x

Performance: -Osize

Regression OLD NEW DELTA RATIO
FlattenListLoop 1454 2186 +50.3% 0.67x (?)
FlattenListFlatMap 4458 5286 +18.6% 0.84x (?)
ArrayAppendLatin1Substring 26712 29484 +10.4% 0.91x (?)
ArrayAppendAsciiSubstring 26172 28872 +10.3% 0.91x (?)
DictionaryBridgeToObjC_Access 756 831 +9.9% 0.91x (?)
ArrayAppendUTF16Substring 26172 28656 +9.5% 0.91x (?)
LessSubstringSubstring 35 38 +8.6% 0.92x (?)
EqualSubstringSubstring 35 38 +8.6% 0.92x
EqualStringSubstring 35 38 +8.6% 0.92x (?)
EqualSubstringSubstringGenericEquatable 35 38 +8.6% 0.92x
EqualSubstringString 35 38 +8.6% 0.92x
LessSubstringSubstringGenericComparable 35 38 +8.6% 0.92x (?)
 
Improvement OLD NEW DELTA RATIO
Set.subtracting.Seq.Int.Empty 207 125 -39.6% 1.66x
Set.subtracting.Empty.Int 35 24 -31.4% 1.46x
Set.subtracting.Int.Empty 50 35 -30.0% 1.43x
Set.subtracting.Seq.Empty.Box 179 126 -29.6% 1.42x
Set.subtracting.Seq.Box.Empty 246 178 -27.6% 1.38x
Set.subtracting.Seq.Empty.Int 169 123 -27.2% 1.37x
NSError 206 153 -25.7% 1.35x (?)
ParseInt.UInt64.Decimal 226 183 -19.0% 1.23x
ParseInt.IntSmall.Decimal 417 357 -14.4% 1.17x
StrToInt 1460 1270 -13.0% 1.15x
ParseInt.UInt64.Hex 350 309 -11.7% 1.13x
ParseInt.IntSmall.UncommonRadix 434 394 -9.2% 1.10x
Histogram 481 438 -8.9% 1.10x (?)
InsertCharacterEndIndexNonASCII 58 53 -8.6% 1.09x (?)
String.data.Medium 96 88 -8.3% 1.09x (?)
ReversedDictionary2 307 282 -8.1% 1.09x (?)
ObjectiveCBridgeStubDataAppend 3440 3160 -8.1% 1.09x (?)
ParseInt.UIntSmall.Binary 695 639 -8.1% 1.09x
IndexPath.Subscript.Mutation 417 384 -7.9% 1.09x (?)
DataSubscriptMedium 66 61 -7.6% 1.08x (?)
StrComplexWalk 4640 4290 -7.5% 1.08x
DataCreateSmall 2660 2480 -6.8% 1.07x (?)
DictionaryBridgeToObjC_Bridge 15 14 -6.7% 1.07x (?)

Code size: -Osize

Regression OLD NEW DELTA RATIO
StringMatch.o 4027 4107 +2.0% 0.98x
NSDictionaryCastToSwift.o 1412 1436 +1.7% 0.98x
FloatingPointParsing.o 17088 17292 +1.2% 0.99x
 
Improvement OLD NEW DELTA RATIO
Histogram.o 2530 2336 -7.7% 1.08x
DictTest3.o 13415 13171 -1.8% 1.02x
RGBHistogram.o 20461 20118 -1.7% 1.02x
DictTest.o 12051 11851 -1.7% 1.02x
RomanNumbers.o 5406 5325 -1.5% 1.02x
IntegerParsing.o 52180 51516 -1.3% 1.01x
DictionaryOfAnyHashableStrings.o 6466 6385 -1.3% 1.01x
StringEdits.o 9986 9871 -1.2% 1.01x
DiffingMyers.o 6462 6395 -1.0% 1.01x

Performance: -Onone

Regression OLD NEW DELTA RATIO
Set.isStrictSuperset.Seq.Empty.Int 1302 1464 +12.4% 0.89x (?)
ErrorHandling 3910 4280 +9.5% 0.91x (?)
Dictionary2 1630 1780 +9.2% 0.92x (?)
 
Improvement OLD NEW DELTA RATIO
SevenBoom 1869 1621 -13.3% 1.15x (?)
UTF8Decode_InitFromBytes_ascii_as_ascii 488 431 -11.7% 1.13x (?)
StringInterpolationManySmallSegments 15500 13900 -10.3% 1.12x (?)
Set.subtracting.Empty.Box 116 105 -9.5% 1.10x
Set.subtracting.Int.Empty 162 148 -8.6% 1.09x (?)
Set.subtracting.Box.Empty 151 138 -8.6% 1.09x (?)
Set.subtracting.Seq.Empty.Box 643 588 -8.6% 1.09x (?)
NSStringConversion.UTF8 2543 2336 -8.1% 1.09x (?)
Set.subtracting.Seq.Int.Empty 878 810 -7.7% 1.08x (?)
Set.subtracting.Empty.Int 131 121 -7.6% 1.08x (?)
Dict.CopyKeyValue.24k 5995 5551 -7.4% 1.08x (?)
Dict.CopyKeyValue.20k 5142 4772 -7.2% 1.08x (?)
UTF8Decode_InitFromData_ascii_as_ascii 699 650 -7.0% 1.08x (?)
Dict.CopyKeyValue.16k 4349 4048 -6.9% 1.07x (?)

Code size: -swiftlibs

Improvement OLD NEW DELTA RATIO
libswiftStdlibUnittest.dylib 327680 311296 -5.0% 1.05x
libswiftFoundation.dylib 1359872 1343488 -1.2% 1.01x
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

For now simply run the pass before SemanticARCOpts. This will probably
be called as a utility from within SemanticARCOpts so it can be
iteratively applied after other ARC-related transformations.
@atrick
Copy link
Member Author

atrick commented Jan 17, 2021

@swift-ci test

@atrick atrick merged commit 0ee3b22 into apple:main Jan 17, 2021
@atrick atrick deleted the copyprop branch October 19, 2022 00:27
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.

None yet

4 participants