Skip to content

[DRAFT][ownership] Test stdlib with ownership + Andy patches #35942

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

Conversation

gottesmm
Copy link
Contributor

Just for testing

gottesmm and others added 14 commits February 10, 2021 19:53
… 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.
This PR just removes an unnecessary error raised in
OwnershipLifetimeExtender::createPlusOneCopy.
We can ownership rauw a value inside the loop with a value outside the
loop. findJointPostDominatingSet correctly helps create control
equivalent copies inside the loop for replacement.
…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.
@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm
Copy link
Contributor Author

@swift-ci benchmark

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 8d5cb4e

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 8d5cb4e

@swift-ci
Copy link
Contributor

Performance: -O

Regression OLD NEW DELTA RATIO
ConvertFloatingPoint.MockFloat64Exactly2 10 23 +130.0% 0.43x
Data.append.Sequence.64kB.Count.I 35 52 +48.6% 0.67x
Data.append.Sequence.64kB.Count 35 52 +48.6% 0.67x
Breadcrumbs.MutatedUTF16ToIdx.ASCII 3 4 +33.3% 0.75x (?)
AngryPhonebook.ASCII2.Small 143 189 +32.2% 0.76x
AngryPhonebook 315 413 +31.1% 0.76x
Data.append.Sequence.809B.Count 85 106 +24.7% 0.80x (?)
Data.append.Sequence.809B.Count.I 88 105 +19.3% 0.84x (?)
NSStringConversion.Medium 392 459 +17.1% 0.85x
NSStringConversion.UTF8 723 843 +16.6% 0.86x (?)
StringSwitch 446 513 +15.0% 0.87x
ParseInt.UInt64.Decimal 179 204 +14.0% 0.88x
ChainedFilterMap 630 711 +12.9% 0.89x
StringMatch 5500 6200 +12.7% 0.89x
StringHasSuffixAscii 2070 2330 +12.6% 0.89x
MapReduceAnyCollection 112 126 +12.5% 0.89x (?)
AngryPhonebook.Strasse 153 172 +12.4% 0.89x
ParseInt.UIntSmall.Binary 642 718 +11.8% 0.89x
String.replaceSubrange.Substring 79 88 +11.4% 0.90x
AngryPhonebook.Armenian 176 196 +11.4% 0.90x (?)
RemoveWhereQuadraticString 258 287 +11.2% 0.90x (?)
StringBuilderWithLongSubstring 1460 1620 +11.0% 0.90x (?)
NSStringConversion.MutableCopy.LongUTF8 570 632 +10.9% 0.90x (?)
FindString.Loop1.Substring 430 476 +10.7% 0.90x
AngryPhonebook.Cyrillic 191 211 +10.5% 0.91x (?)
StringHasPrefixAscii 1920 2120 +10.4% 0.91x
DictionaryCompactMapValuesOfCastValue 6318 6912 +9.4% 0.91x (?)
DictionarySwap 896 980 +9.4% 0.91x
LuhnAlgoEager 195 213 +9.2% 0.92x (?)
StringBuilderLong 1210 1320 +9.1% 0.92x (?)
CSVParsing.UTF16 44 48 +9.1% 0.92x (?)
ParseFloat.Float.Exp 11 12 +9.1% 0.92x (?)
NSStringConversion.Long 881 961 +9.1% 0.92x
FindString.Rec3.Substring 169 184 +8.9% 0.92x (?)
DictionaryBridgeToObjC_Access 843 917 +8.8% 0.92x (?)
StringBuilderSmallReservingCapacity 323 350 +8.4% 0.92x
LuhnAlgoLazy 199 215 +8.0% 0.93x (?)
Data.hash.Empty 64 69 +7.8% 0.93x
FindString.Rec3.String 155 167 +7.7% 0.93x
StringComparison_abnormal 780 840 +7.7% 0.93x (?)
ParseInt.UInt64.Hex 291 313 +7.6% 0.93x
 
Improvement OLD NEW DELTA RATIO
PrefixWhileAnySequence 1349 328 -75.7% 4.11x
Data.init.Sequence.64kB.Count.I 52 35 -32.7% 1.49x
Data.init.Sequence.64kB.Count 52 35 -32.7% 1.49x
Breadcrumbs.CopyUTF16CodeUnits.ASCII 25 18 -28.0% 1.39x
Data.init.Sequence.2047B.Count.I 91 66 -27.5% 1.38x (?)
Data.init.Sequence.2049B.Count.I 91 66 -27.5% 1.38x (?)
Data.init.Sequence.809B.Count 85 67 -21.2% 1.27x (?)
Data.init.Sequence.809B.Count.I 85 67 -21.2% 1.27x (?)
UTF8Decode_InitFromData 221 176 -20.4% 1.26x
UTF8Decode_InitDecoding 222 177 -20.3% 1.25x
UTF8Decode_InitFromCustom_contiguous 223 179 -19.7% 1.25x
UTF8Decode_InitFromBytes 224 185 -17.4% 1.21x
Data.init.Sequence.513B.Count.I 99 83 -16.2% 1.19x (?)
Prims.NonStrongRef.Unmanaged.Closure 181 153 -15.5% 1.18x
Prims.NonStrongRef.Unmanaged 181 153 -15.5% 1.18x (?)
Data.init.Sequence.511B.Count.I 98 83 -15.3% 1.18x (?)
Prims.NonStrongRef.UnmanagedUGR 178 151 -15.2% 1.18x
Prims.NonStrongRef.UnmanagedUGR.Closure 178 151 -15.2% 1.18x (?)
DictionaryKeysContainsCocoa 27 23 -14.8% 1.17x (?)
ReversedBidirectional 9416 8053 -14.5% 1.17x
Prims.NonStrongRef.UnownedUnsafe 216 187 -13.4% 1.16x (?)
Prims.NonStrongRef.UnownedUnsafe.Closure 216 188 -13.0% 1.15x
Diffing.Same 8 7 -12.5% 1.14x (?)
Dictionary3 180 158 -12.2% 1.14x
String.data.Medium 112 100 -10.7% 1.12x (?)
Dictionary4OfObjects 317 287 -9.5% 1.10x
ArrayAppendLatin1Substring 15588 14184 -9.0% 1.10x
ArrayPlusEqualThreeElements 1490 1360 -8.7% 1.10x (?)
ArrayAppendAscii 3264 2992 -8.3% 1.09x
ArrayAppendUTF16 3264 2992 -8.3% 1.09x
Breadcrumbs.IdxToUTF16Range.longASCII 37 34 -8.1% 1.09x
ArrayAppendAsciiSubstring 15264 14040 -8.0% 1.09x (?)
COWArrayGuaranteedParameterOverhead 3150 2900 -7.9% 1.09x (?)
Breadcrumbs.CopyUTF16CodeUnits.Mixed 77 71 -7.8% 1.08x
LessSubstringSubstring 39 36 -7.7% 1.08x
ArrayAppendUTF16Substring 15228 14076 -7.6% 1.08x
MapReduceAnyCollectionShort 1740 1610 -7.5% 1.08x (?)
MapReduceShort 1920 1780 -7.3% 1.08x (?)
ArrayAppendLatin1 3332 3094 -7.1% 1.08x (?)
Set.subtracting.Empty.Box 14 13 -7.1% 1.08x (?)
Dictionary 435 405 -6.9% 1.07x
MapReduceClassShort2 164 153 -6.7% 1.07x (?)

Code size: -O

Regression OLD NEW DELTA RATIO
ChainedFilterMap.o 2613 3189 +22.0% 0.82x
RomanNumbers.o 5654 6774 +19.8% 0.83x
IntegerParsing.o 56197 60565 +7.8% 0.93x
SortIntPyramids.o 8800 9040 +2.7% 0.97x
SequenceAlgos.o 20492 20860 +1.8% 0.98x
RandomTree.o 12095 12271 +1.5% 0.99x
PrimsNonStrongRef.o 131504 133080 +1.2% 0.99x
StringMatch.o 4114 4162 +1.2% 0.99x
Histogram.o 2944 2975 +1.1% 0.99x
 
Improvement OLD NEW DELTA RATIO
RangeReplaceableCollectionPlusDefault.o 5396 4798 -11.1% 1.12x
StrToInt.o 3553 3214 -9.5% 1.11x
StringBuilder.o 7873 7505 -4.7% 1.05x
PrefixWhile.o 16182 15613 -3.5% 1.04x
DictionarySwap.o 17785 17209 -3.2% 1.03x
DictionaryCompactMapValues.o 13845 13437 -2.9% 1.03x
DictionaryBridgeToObjC.o 5201 5065 -2.6% 1.03x
LuhnAlgoEager.o 11282 11002 -2.5% 1.03x
LuhnAlgoLazy.o 11282 11002 -2.5% 1.03x
DictTest4Legacy.o 16040 15648 -2.4% 1.03x
DictTest4.o 15562 15218 -2.2% 1.02x
DictTest3.o 15261 14941 -2.1% 1.02x
FindStringNaive.o 8635 8475 -1.9% 1.02x
ClassArrayGetter.o 3368 3320 -1.4% 1.01x
Substring.o 18512 18256 -1.4% 1.01x
WordCount.o 37721 37209 -1.4% 1.01x
ObserverClosure.o 2430 2398 -1.3% 1.01x
BucketSort.o 8703 8591 -1.3% 1.01x
ObserverPartiallyAppliedMethod.o 2493 2461 -1.3% 1.01x
DictionaryOfAnyHashableStrings.o 7840 7744 -1.2% 1.01x
DictionaryGroup.o 11831 11687 -1.2% 1.01x
LazyFilter.o 7992 7896 -1.2% 1.01x
DataBenchmarks.o 60223 59519 -1.2% 1.01x
MonteCarloE.o 2833 2801 -1.1% 1.01x
Hash.o 22127 21879 -1.1% 1.01x
Array2D.o 2933 2901 -1.1% 1.01x
Join.o 1593 1577 -1.0% 1.01x

Performance: -Osize

Regression OLD NEW DELTA RATIO
SuffixAnySequence 718 2291 +219.1% 0.31x
SuffixSequenceLazy 717 2287 +219.0% 0.31x
SuffixSequence 717 2152 +200.1% 0.33x
Dict.CopyKeyValue.28k 1715 2992 +74.5% 0.57x
Dict.CopyKeyValue.16k 891 1551 +74.1% 0.57x
Dict.CopyKeyValue.20k 992 1703 +71.7% 0.58x
Dict.CopyKeyValue.24k 1111 1893 +70.4% 0.59x
SetSymmetricDifferenceInt100 138 200 +44.9% 0.69x
NSStringConversion.UTF8 690 960 +39.1% 0.72x (?)
TwoSum 1038 1390 +33.9% 0.75x
Breadcrumbs.MutatedUTF16ToIdx.ASCII 3 4 +33.3% 0.75x
Breadcrumbs.MutatedIdxToUTF16.ASCII 3 4 +33.3% 0.75x
AngryPhonebook.ASCII2.Small 142 189 +33.1% 0.75x
AngryPhonebook 315 413 +31.1% 0.76x
FrequenciesUsingReduceInto 730 940 +28.8% 0.78x
SetSymmetricDifferenceInt50 154 198 +28.6% 0.78x
RGBHistogram 2020 2470 +22.3% 0.82x
SuffixAnySeqCntRange 677 819 +21.0% 0.83x
StringRemoveDupes 262 314 +19.8% 0.83x
SetSymmetricDifferenceInt25 158 189 +19.6% 0.84x
SuffixAnySeqCRangeIter 721 850 +17.9% 0.85x
NSStringConversion.Medium 400 464 +16.0% 0.86x
StringSwitch 452 520 +15.0% 0.87x
DictionaryOfAnyHashableStrings_insert 4998 5726 +14.6% 0.87x (?)
StringHasSuffixAscii 1940 2200 +13.4% 0.88x
FindString.Loop1.Substring 419 475 +13.4% 0.88x
DropWhileAnySeqCRangeIterLazy 242 274 +13.2% 0.88x
DropWhileAnySeqCntRangeLazy 242 274 +13.2% 0.88x
ParseInt.UIntSmall.Binary 634 715 +12.8% 0.89x (?)
AngryPhonebook.Strasse 153 172 +12.4% 0.89x (?)
StringMatch 5900 6600 +11.9% 0.89x (?)
Histogram 439 491 +11.8% 0.89x (?)
DictionaryLiteral 2960 3310 +11.8% 0.89x (?)
RemoveWhereQuadraticString 257 287 +11.7% 0.90x (?)
ObjectiveCBridgeToNSSet 14600 16300 +11.6% 0.90x (?)
String.replaceSubrange.Substring 79 88 +11.4% 0.90x (?)
AngryPhonebook.Armenian 176 196 +11.4% 0.90x
Prims 850 945 +11.2% 0.90x (?)
CSVParsing.UTF16 45 50 +11.1% 0.90x
StringHasPrefixAscii 1820 2020 +11.0% 0.90x
AngryPhonebook.Cyrillic 191 211 +10.5% 0.91x (?)
DictionaryCompactMapValuesOfCastValue 6318 6966 +10.3% 0.91x
DictionarySubscriptDefaultMutation 288 317 +10.1% 0.91x (?)
PrimsSplit 855 940 +9.9% 0.91x (?)
DropFirstAnySeqCRangeIter 163 179 +9.8% 0.91x (?)
DropFirstAnySeqCntRange 163 179 +9.8% 0.91x (?)
Dictionary2 770 845 +9.7% 0.91x (?)
NSStringConversion.MutableCopy.LongUTF8 547 600 +9.7% 0.91x (?)
StringUTF16SubstringBuilder 3110 3400 +9.3% 0.91x (?)
RomanNumbers2 506 553 +9.3% 0.92x
SetExclusiveOr 3030 3300 +8.9% 0.92x (?)
SuffixAnyCollection 58 63 +8.6% 0.92x (?)
SetSymmetricDifferenceInt0 304 330 +8.6% 0.92x
ProtocolDispatch 307 333 +8.5% 0.92x (?)
FindString.Rec3.String 155 168 +8.4% 0.92x (?)
CSVParsingAltIndices2 792 858 +8.3% 0.92x (?)
FloatingPointPrinting_Float_description_small 3996 4320 +8.1% 0.93x
NSStringConversion.LongUTF8 434 469 +8.1% 0.93x (?)
SuffixAnySequenceLazy 4010 4333 +8.1% 0.93x (?)
Dictionary2OfObjects 2060 2225 +8.0% 0.93x (?)
Array2D 6256 6736 +7.7% 0.93x
 
Improvement OLD NEW DELTA RATIO
PrefixWhileAnySeqCRangeIterLazy 171 32 -81.3% 5.34x
PrefixWhileAnySeqCntRangeLazy 171 32 -81.3% 5.34x
PrefixWhileAnySequence 1477 330 -77.7% 4.48x
PrefixAnySeqCntRange 173 39 -77.5% 4.44x
PrefixAnySeqCRangeIter 157 39 -75.2% 4.03x
Set.isSuperset.Seq.Box25 219 136 -37.9% 1.61x
SetIsSubsetBox25 225 153 -32.0% 1.47x
Set.isStrictSubset.Box25 225 154 -31.6% 1.46x
Breadcrumbs.CopyUTF16CodeUnits.ASCII 25 18 -28.0% 1.39x
Set.isDisjoint.Box25 610 446 -26.9% 1.37x
UTF8Decode_InitFromCustom_contiguous 225 177 -21.3% 1.27x
UTF8Decode_InitDecoding 221 174 -21.3% 1.27x
UTF8Decode_InitFromData 219 175 -20.1% 1.25x
UTF8Decode_InitFromBytes 226 181 -19.9% 1.25x
Set.isDisjoint.Seq.Box0 719 590 -17.9% 1.22x
Set.isDisjoint.Box0 731 606 -17.1% 1.21x
Set.isDisjoint.Seq.Box25 514 435 -15.4% 1.18x (?)
DictionaryKeysContainsCocoa 27 23 -14.8% 1.17x (?)
SetIntersectionBox0 148 127 -14.2% 1.17x
ArrayAppendLatin1 3536 3060 -13.5% 1.16x (?)
ArrayAppendAscii 3434 2992 -12.9% 1.15x (?)
ArrayAppendUTF16 3434 2992 -12.9% 1.15x (?)
Prims.NonStrongRef.UnmanagedUGR 196 172 -12.2% 1.14x
ObjectiveCBridgeFromNSSetAnyObject 32200 28400 -11.8% 1.13x (?)
Prims.NonStrongRef.UnmanagedUGR.Closure 197 174 -11.7% 1.13x (?)
UTF8Decode_InitFromCustom_noncontiguous 403 358 -11.2% 1.13x
SetIntersectionBox25 273 244 -10.6% 1.12x
Prims.NonStrongRef.UnownedUnsafe.Closure 235 211 -10.2% 1.11x (?)
DataAccessBytesMedium 79 71 -10.1% 1.11x
DropLastAnyCollection 64 58 -9.4% 1.10x
Prims.NonStrongRef.UnownedUnsafe 235 213 -9.4% 1.10x (?)
Prims.NonStrongRef.Unmanaged.Closure 194 176 -9.3% 1.10x (?)
PrefixAnyCollection 179 163 -8.9% 1.10x
Prims.NonStrongRef.Unmanaged 194 177 -8.8% 1.10x (?)
CharIteration_russian_unicodeScalars 3240 2960 -8.6% 1.09x (?)
DictionarySwapOfObjects 7040 6440 -8.5% 1.09x (?)
DictionaryKeysContainsNative 24 22 -8.3% 1.09x (?)
DropWhileAnySeqCntRange 196 180 -8.2% 1.09x
DropWhileAnySeqCRangeIter 196 180 -8.2% 1.09x (?)
PrefixWhileAnyCollectionLazy 172 158 -8.1% 1.09x (?)
BinaryFloatingPointPropertiesBinade 25 23 -8.0% 1.09x (?)
RandomTree.insert.Unmanaged.fast 189 174 -7.9% 1.09x (?)
ReversedDictionary2 307 283 -7.8% 1.08x
Breadcrumbs.CopyUTF16CodeUnits.Mixed 77 71 -7.8% 1.08x (?)
RangeReplaceableCollectionPlusDefault 732 676 -7.7% 1.08x (?)
DictionaryRemove 5650 5230 -7.4% 1.08x (?)
CharIndexing_punctuated_unicodeScalars 1120 1040 -7.1% 1.08x
BitCount 198 184 -7.1% 1.08x
CharIndexing_tweet_unicodeScalars 9680 9000 -7.0% 1.08x (?)
IndexPath.Subscript.Mutation 384 358 -6.8% 1.07x (?)
DataSubscriptSmall 30 28 -6.7% 1.07x
DataCountMedium 30 28 -6.7% 1.07x (?)
PrefixWhileAnyCollection 226 211 -6.6% 1.07x (?)
StringWalk 2440 2280 -6.6% 1.07x
CSVParsing.Scalar 168 157 -6.5% 1.07x (?)

Code size: -Osize

Regression OLD NEW DELTA RATIO
Suffix.o 19483 24703 +26.8% 0.79x
IntegerParsing.o 51359 55876 +8.8% 0.92x
ArraySubscript.o 2193 2297 +4.7% 0.95x
BitCount.o 1407 1464 +4.1% 0.96x
StrComplexWalk.o 2462 2561 +4.0% 0.96x
PopFrontGeneric.o 2501 2599 +3.9% 0.96x
BinaryFloatingPointProperties.o 4636 4796 +3.5% 0.97x
SortIntPyramids.o 8494 8778 +3.3% 0.97x
PopFront.o 3216 3317 +3.1% 0.97x
StringInterpolation.o 6323 6518 +3.1% 0.97x
RC4.o 2853 2933 +2.8% 0.97x
DictionaryRemove.o 10373 10579 +2.0% 0.98x
NSStringConversion.o 11091 11257 +1.5% 0.99x
RangeReplaceableCollectionPlusDefault.o 4462 4516 +1.2% 0.99x
CharacterProperties.o 19993 20229 +1.2% 0.99x
SequenceAlgos.o 20254 20492 +1.2% 0.99x
 
Improvement OLD NEW DELTA RATIO
Histogram.o 2288 1477 -35.4% 1.55x
TwoSum.o 3296 2593 -21.3% 1.27x
StringRemoveDupes.o 4640 3706 -20.1% 1.25x
DictionaryOfAnyHashableStrings.o 6363 5260 -17.3% 1.21x
DictTest4Legacy.o 14038 11615 -17.3% 1.21x
DictTest4.o 13475 11376 -15.6% 1.18x
DictionarySubscriptDefault.o 15697 13488 -14.1% 1.16x
PrimsNonStrongRef.o 92559 82970 -10.4% 1.12x
DictTest2.o 8833 7924 -10.3% 1.11x
StrToInt.o 3323 3008 -9.5% 1.10x
ReversedCollections.o 7887 7164 -9.2% 1.10x
DictTest.o 11687 10682 -8.6% 1.09x
DictTest3.o 13293 12212 -8.1% 1.09x
ReduceInto.o 8788 8075 -8.1% 1.09x
Prims.o 11339 10520 -7.2% 1.08x
PrimsSplit.o 11391 10572 -7.2% 1.08x
PrefixWhile.o 14740 13759 -6.7% 1.07x
Prefix.o 15811 14936 -5.5% 1.06x
RGBHistogram.o 20134 19174 -4.8% 1.05x
DictOfArraysToArrayOfDicts.o 20799 19955 -4.1% 1.04x
StringBuilder.o 7376 7084 -4.0% 1.04x
SetTests.o 109521 106236 -3.0% 1.03x
RomanNumbers.o 5278 5128 -2.8% 1.03x
StringMatch.o 3931 3848 -2.1% 1.02x
DictionarySwap.o 15764 15453 -2.0% 1.02x
DictionaryCompactMapValues.o 12115 11890 -1.9% 1.02x
ClassArrayGetter.o 3103 3054 -1.6% 1.02x
DataBenchmarks.o 50710 49980 -1.4% 1.01x
StringEdits.o 9820 9681 -1.4% 1.01x
DictionaryGroup.o 10288 10154 -1.3% 1.01x
MonteCarloE.o 2689 2657 -1.2% 1.01x
LuhnAlgoEager.o 12199 12063 -1.1% 1.01x
LuhnAlgoLazy.o 12199 12063 -1.1% 1.01x
Join.o 1457 1441 -1.1% 1.01x
LazyFilter.o 7326 7247 -1.1% 1.01x
WordCount.o 35721 35341 -1.1% 1.01x
Hash.o 18377 18185 -1.0% 1.01x

Performance: -Onone

Regression OLD NEW DELTA RATIO
NSStringConversion.LongUTF8 1831 2933 +60.2% 0.62x
NSStringConversion.Long 5125 7971 +55.5% 0.64x
NSStringConversion.Medium 2002 3026 +51.1% 0.66x
NSStringConversion.UTF8 2429 3483 +43.4% 0.70x
ArrayOfPOD 1002 1386 +38.3% 0.72x (?)
NSStringConversion.MutableCopy.LongUTF8 1311 1759 +34.2% 0.75x (?)
ArrayOfGenericPOD2 927 1195 +28.9% 0.78x (?)
NSStringConversion.MutableCopy.Long 1947 2417 +24.1% 0.81x
AngryPhonebook 490 588 +20.0% 0.83x
NSStringConversion.MutableCopy.Medium 1736 2072 +19.4% 0.84x
DictionaryBridgeToObjC_Access 903 1070 +18.5% 0.84x (?)
AngryPhonebook.ASCII2.Small 230 272 +18.3% 0.85x
ObjectiveCBridgeStringGetUTF8Contents 57 65 +14.0% 0.88x (?)
StringMatch 35800 40800 +14.0% 0.88x (?)
AngryPhonebook.Strasse 153 173 +13.1% 0.88x (?)
String.replaceSubrange.Substring 84 94 +11.9% 0.89x
StringEnumRawValueInitialization 12520 13980 +11.7% 0.90x (?)
AngryPhonebook.Armenian 177 196 +10.7% 0.90x
AngryPhonebook.Cyrillic 191 211 +10.5% 0.91x (?)
Breadcrumbs.MutatedIdxToUTF16.ASCII 10 11 +10.0% 0.91x (?)
StringSwitch 1807 1946 +7.7% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
DataCopyBytesSmall 2642 773 -70.7% 3.42x
DataCopyBytesMedium 2772 876 -68.4% 3.16x
ByteSwap 16506 5251 -68.2% 3.14x
BitCount 45769 16750 -63.4% 2.73x
HTTP2StateMachine 1552657 745689 -52.0% 2.08x
DataCountMedium 1340 667 -50.2% 2.01x
DataCountSmall 1338 673 -49.7% 1.99x
ProtocolDispatch 13250 6701 -49.4% 1.98x
PointerArithmetics 1332400 678100 -49.1% 1.96x
CharIndexing_punctuated_unicodeScalars_Backwards 67120 35400 -47.3% 1.90x
CharIndexing_chinese_unicodeScalars_Backwards 228200 122000 -46.5% 1.87x
CharIndexing_japanese_unicodeScalars_Backwards 359160 192040 -46.5% 1.87x
CharIndexing_korean_unicodeScalars_Backwards 292880 156720 -46.5% 1.87x
CharIndexing_tweet_unicodeScalars_Backwards 585680 313960 -46.4% 1.87x
CharIndexing_russian_unicodeScalars_Backwards 249200 133680 -46.4% 1.86x
CharIndexing_ascii_unicodeScalars_Backwards 295360 158520 -46.3% 1.86x
CharIndexing_punctuatedJapanese_unicodeScalars_Backwards 52240 28040 -46.3% 1.86x
DataAccessBytesSmall 1456 783 -46.2% 1.86x
DataAccessBytesMedium 1402 759 -45.9% 1.85x
CharIndexing_utf16_unicodeScalars_Backwards 305600 165560 -45.8% 1.85x
Radix2CooleyTukeyf 83424 45456 -45.5% 1.84x
ExclusivityGlobal 1391 761 -45.3% 1.83x
SubstringFromLongString 74 41 -44.6% 1.80x
StringFromLongWholeSubstring 73 41 -43.8% 1.78x
DataSetCountSmall 1416 798 -43.6% 1.77x
MonteCarloPi 9408500 5378125 -42.8% 1.75x
ArraySubscript 187360 107776 -42.5% 1.74x
DataMutateBytesSmall 1560 900 -42.3% 1.73x
MonteCarloE 2022840 1192380 -41.1% 1.70x
Radix2CooleyTukey 90768 53568 -41.0% 1.69x
DataAppendBytesSmall 1606 957 -40.4% 1.68x
StringFromLongWholeSubstringGeneric 81 49 -39.5% 1.65x
NopDeinit 798900 486300 -39.1% 1.64x
DataSetCountMedium 1610 990 -38.5% 1.63x
SubstringFromLongStringGeneric 88 56 -36.4% 1.57x
NSStringConversion 1745 1145 -34.4% 1.52x
ArrayValueProp4 7858 5223 -33.5% 1.50x
FloatingPointPrinting_Float_description_small 19764 13284 -32.8% 1.49x
ArrayValueProp3 7873 5292 -32.8% 1.49x
OpenClose 1875 1267 -32.4% 1.48x
EqualStringSubstring 111 76 -31.5% 1.46x
LessSubstringSubstring 109 75 -31.2% 1.45x
ExclusivityIndependent 212 146 -31.1% 1.45x
EqualSubstringSubstring 110 76 -30.9% 1.45x
RandomIntegersLCG 38984 26945 -30.9% 1.45x
EqualSubstringSubstringGenericEquatable 107 74 -30.8% 1.45x
LessSubstringSubstringGenericComparable 107 74 -30.8% 1.45x
EqualSubstringString 110 77 -30.0% 1.43x
CharacterLiteralsLarge 1802 1267 -29.7% 1.42x
NSStringConversion.Rebridge 573 413 -27.9% 1.39x (?)
DictionaryRemove 24310 17560 -27.8% 1.38x
NSStringConversion.Mutable 3171 2338 -26.3% 1.36x (?)
StringToDataLargeUnicode 8050 6050 -24.8% 1.33x (?)
DictionarySwapAt 4612 3492 -24.3% 1.32x
SevenBoom 1641 1253 -23.6% 1.31x (?)
StringAdder 1302 996 -23.5% 1.31x
SetIntersectionInt0 168 129 -23.2% 1.30x
StringWalk 22640 17400 -23.1% 1.30x
ProtocolDispatch2 11180 8608 -23.0% 1.30x
AnyHashableWithAClass 140500 108500 -22.8% 1.29x (?)
UTF8Decode_InitDecoding 242 187 -22.7% 1.29x (?)
SetIntersect 1680 1300 -22.6% 1.29x
DataReplaceMediumBuffer 8000 6200 -22.5% 1.29x (?)
RandomDoubleLCG 51622 40058 -22.4% 1.29x
FloatingPointPrinting_Double_description_small 30500 23700 -22.3% 1.29x (?)
StringToDataEmpty 3600 2800 -22.2% 1.29x (?)
ArrayLiteral2 2951 2299 -22.1% 1.28x (?)
CreateObjects 2961 2318 -21.7% 1.28x
StringToDataSmall 3700 2900 -21.6% 1.28x (?)
NSStringConversion.Rebridge.Mutable 1568 1233 -21.4% 1.27x (?)
NSStringConversion.Rebridge.Medium 312 246 -21.2% 1.27x (?)
NSStringConversion.Rebridge.Long 312 246 -21.2% 1.27x (?)
DataToStringLargeUnicode 10300 8150 -20.9% 1.26x (?)
UTF8Decode_InitFromCustom_contiguous 240 190 -20.8% 1.26x
NSStringConversion.Rebridge.LongUTF8 96 76 -20.8% 1.26x (?)
StrComplexWalk 26470 21000 -20.7% 1.26x
NSStringConversion.Rebridge.UTF8 800 636 -20.5% 1.26x (?)
CharacterLiteralsSmall 2302 1833 -20.4% 1.26x
DataToStringEmpty 2700 2150 -20.4% 1.26x (?)
ArrayOfRef 9540 7600 -20.3% 1.26x (?)
UTF8Decode_InitFromData 220 176 -20.0% 1.25x
ArrayOfGenericRef 9730 7810 -19.7% 1.25x (?)
UTF8Decode_InitFromBytes 229 184 -19.7% 1.24x (?)
DataToStringSmall 5100 4100 -19.6% 1.24x (?)
StackPromo 62300 50100 -19.6% 1.24x (?)
DataReplaceSmall 4100 3300 -19.5% 1.24x (?)
StringToDataMedium 7500 6100 -18.7% 1.23x (?)
HashTest 12170 9940 -18.3% 1.22x (?)
DataMutateBytesMedium 3760 3080 -18.1% 1.22x (?)
DictionarySwap 5736 4700 -18.1% 1.22x (?)
CharIteration_punctuatedJapanese_unicodeScalars 16840 13800 -18.1% 1.22x (?)
NSDictionaryCastToSwift 3550 2910 -18.0% 1.22x (?)
SetIsSubsetInt25 233 191 -18.0% 1.22x
RandomIntegersDef 68500 56300 -17.8% 1.22x
DataReplaceSmallBuffer 5100 4200 -17.6% 1.21x (?)
DataAppendDataSmallToSmall 6040 4980 -17.5% 1.21x (?)
Dictionary2 1675 1385 -17.3% 1.21x (?)
DataAppendArray 5800 4800 -17.2% 1.21x (?)
DictionaryBridgeToObjC_Bridge 29 24 -17.2% 1.21x (?)
Set.isStrictSubset.Int25 233 193 -17.2% 1.21x
RandomDoubleDef 83500 69300 -17.0% 1.20x (?)
DataAppendDataMediumToSmall 5580 4640 -16.8% 1.20x (?)
DataAppendDataMediumToMedium 6160 5140 -16.6% 1.20x (?)
CharIteration_chinese_unicodeScalars 69160 57840 -16.4% 1.20x (?)
DataReset 3700 3100 -16.2% 1.19x (?)
DevirtualizeProtocolComposition 8054 6755 -16.1% 1.19x
CharIteration_japanese_unicodeScalars 108320 90920 -16.1% 1.19x (?)
ArrayInitFromSlice 580 487 -16.0% 1.19x (?)
Set.isDisjoint.Int0 880 739 -16.0% 1.19x
Set.isStrictSubset.Int50 438 368 -16.0% 1.19x
CharIteration_punctuated_unicodeScalars 20880 17560 -15.9% 1.19x (?)
SetIsSubsetInt50 437 368 -15.8% 1.19x
SetIsSubsetInt100 763 643 -15.7% 1.19x
CharIteration_russian_unicodeScalars 75520 63800 -15.5% 1.18x (?)
DataReplaceMedium 5900 5000 -15.3% 1.18x (?)
NSError 764 648 -15.2% 1.18x (?)
DataToStringMedium 8250 7000 -15.2% 1.18x (?)
StringBuilderLong 2080 1770 -14.9% 1.18x (?)
CharIteration_tweet_unicodeScalars 174240 148600 -14.7% 1.17x (?)
CharIteration_korean_unicodeScalars 88360 75440 -14.6% 1.17x (?)
CharIteration_ascii_unicodeScalars 88920 76040 -14.5% 1.17x (?)
DataAppendBytesMedium 5800 4960 -14.5% 1.17x (?)
StringUTF16SubstringBuilder 13660 11690 -14.4% 1.17x (?)
Walsh 8411 7202 -14.4% 1.17x
StringBuilderWithLongSubstring 4530 3880 -14.3% 1.17x (?)
CharIteration_utf16_unicodeScalars 101880 87480 -14.1% 1.16x (?)
DataAppendDataSmallToMedium 5540 4760 -14.1% 1.16x (?)
ArrayValueProp 4645 4013 -13.6% 1.16x (?)
ObjectiveCBridgeFromNSSetAnyObject 37200 32400 -12.9% 1.15x (?)
CStringLongAscii 338 295 -12.7% 1.15x (?)
Diffing.Same 8 7 -12.5% 1.14x (?)
Breadcrumbs.MutatedUTF16ToIdx.Mixed 281 246 -12.5% 1.14x (?)
CharIteration_punctuated_unicodeScalars_Backwards 29160 25640 -12.1% 1.14x (?)
CharIteration_punctuatedJapanese_unicodeScalars_Backwards 23280 20480 -12.0% 1.14x (?)
DictionarySwapAtOfObjects 16764 14773 -11.9% 1.13x (?)
StringInterpolation 12700 11200 -11.8% 1.13x (?)
SetIntersectionInt25 353 312 -11.6% 1.13x
CharIteration_russian_unicodeScalars_Backwards 108800 96200 -11.6% 1.13x (?)
Hanoi 12420 10990 -11.5% 1.13x (?)
CharIteration_ascii_unicodeScalars_Backwards 125480 111720 -11.0% 1.12x (?)
NibbleSort 638140 568390 -10.9% 1.12x (?)
CharIteration_korean_unicodeScalars_Backwards 126760 113000 -10.9% 1.12x (?)
Set.isDisjoint.Box0 2418 2158 -10.8% 1.12x
CharIteration_tweet_unicodeScalars_Backwards 246560 220200 -10.7% 1.12x (?)
NSStringConversion.MutableCopy.Rebridge.UTF8 1070 958 -10.5% 1.12x (?)
CharIteration_japanese_unicodeScalars_Backwards 154680 138840 -10.2% 1.11x (?)
ArrayValueProp2 6175 5546 -10.2% 1.11x (?)
CharIteration_chinese_unicodeScalars_Backwards 98120 88160 -10.2% 1.11x (?)
Set.isStrictSubset.Box25 757 681 -10.0% 1.11x
DictionaryKeysContainsNative 40 36 -10.0% 1.11x (?)
CSVParsingAlt2 3311 2981 -10.0% 1.11x (?)
SetIsSubsetBox25 755 680 -9.9% 1.11x
SetIntersectionBox0 503 454 -9.7% 1.11x
ReversedBidirectional 98227 88780 -9.6% 1.11x (?)
Sim2DArray 14081 12767 -9.3% 1.10x
DataCreateSmall 77730 70540 -9.2% 1.10x
DictionaryBridgeToObjC_BulkAccess 158 144 -8.9% 1.10x (?)
CStringLongNonAscii 350 319 -8.9% 1.10x (?)
StringUTF16Builder 2770 2540 -8.3% 1.09x (?)
SetIsSubsetInt0 596 547 -8.2% 1.09x
CharacterPropertiesStashedMemo 3340 3070 -8.1% 1.09x (?)
SetSymmetricDifferenceInt50 587 540 -8.0% 1.09x
CSVParsingAltIndices2 4026 3707 -7.9% 1.09x (?)
Dictionary4OfObjects 1333 1229 -7.8% 1.08x (?)
StringBuilder 2705 2494 -7.8% 1.08x (?)
SetSymmetricDifferenceInt100 554 512 -7.6% 1.08x
SetSymmetricDifferenceInt25 612 566 -7.5% 1.08x
StringWordBuilderReservingCapacity 2410 2230 -7.5% 1.08x (?)
SetIntersectionInt50 503 466 -7.4% 1.08x
StringWordBuilder 2460 2280 -7.3% 1.08x (?)
Set.isStrictSubset.Int0 606 562 -7.3% 1.08x (?)
DictionaryKeysContainsCocoa 43 40 -7.0% 1.07x (?)
ClassArrayGetter2 4420 4120 -6.8% 1.07x (?)
DictionarySubscriptDefaultMutation 4073 3798 -6.8% 1.07x (?)
BinaryFloatingPointPropertiesNextUp 208 194 -6.7% 1.07x
CharacterPropertiesPrecomputed 2840 2650 -6.7% 1.07x (?)
Dictionary4OfObjectsLegacy 1483 1385 -6.6% 1.07x (?)
Set.isDisjoint.Box25 2150 2009 -6.6% 1.07x (?)

Code size: -swiftlibs

Improvement OLD NEW DELTA RATIO
libswiftFoundation.dylib 1343488 1294336 -3.7% 1.04x
libswiftCore.dylib 3932160 3833856 -2.5% 1.03x
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

@gottesmm gottesmm closed this Feb 15, 2021
@gottesmm gottesmm deleted the ossa-serialize-then-lower-ownership-with-andy-fix branch February 15, 2021 02: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.

4 participants