Skip to content

COWOpts: handle debug_value instructions #39059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2021

Conversation

eeckstein
Copy link
Contributor

Don't let debug_value instructions bail the optimization.

This fixes a couple of performance regressions, which were introduced by adding more debug_value instructions (#38736).

rdar://82327743

Don't let debug_value instructions bail the optimization.

This fixes a couple of performance regressions, which were introduced by adding more debug_value instructions (swiftlang#38736).

rdar://82327743
@eeckstein
Copy link
Contributor Author

@swift-ci smoke test

@eeckstein
Copy link
Contributor Author

@swift-ci benchmark

@eeckstein eeckstein requested a review from meg-gupta August 26, 2021 11:55
@swift-ci
Copy link
Contributor

Performance (x86_64): -O

Regression OLD NEW DELTA RATIO
DictionaryOfAnyHashableStrings_insert 2744 5572 +103.1% 0.49x
Set.isDisjoint.Int25 268 345 +28.7% 0.78x (?)
Set.isDisjoint.Int50 268 335 +25.0% 0.80x (?)
DictionaryKeysContainsNative 21 25 +19.0% 0.84x (?)
FloatingPointPrinting_Float_description_uniform 4700 5100 +8.5% 0.92x (?)
 
Improvement OLD NEW DELTA RATIO
XorLoop 2033 381 -81.3% 5.34x
ArrayAppendReserved 1600 460 -71.2% 3.48x
RC4 422 149 -64.7% 2.83x
ArrayPlusEqualFiveElementCollection 9065 3367 -62.9% 2.69x
ArrayPlusEqualSingleElementCollection 2068 799 -61.4% 2.59x
ArrayAppend 1920 780 -59.4% 2.46x
BucketSort 276 123 -55.4% 2.24x
FlattenListLoop 5499 2548 -53.7% 2.16x
StringFromLongWholeSubstring 5 4 -20.0% 1.25x
AngryPhonebook.Armenian 259 208 -19.7% 1.25x (?)
AngryPhonebook.Cyrillic 276 223 -19.2% 1.24x
AngryPhonebook.Strasse 217 183 -15.7% 1.19x
Breadcrumbs.MutatedIdxToUTF16.Mixed 310 273 -11.9% 1.14x (?)

Code size: -O

Improvement OLD NEW DELTA RATIO
XorLoop.o 2099 1602 -23.7% 1.31x
ArraySubscript.o 3108 2382 -23.4% 1.30x
BinaryFloatingPointProperties.o 5264 5104 -3.0% 1.03x
Hash.o 22407 21783 -2.8% 1.03x
FlattenList.o 4106 3994 -2.7% 1.03x
BucketSort.o 9015 8799 -2.4% 1.02x
ArrayAppend.o 25337 24777 -2.2% 1.02x
StringEdits.o 10229 10005 -2.2% 1.02x
MonteCarloE.o 2937 2889 -1.6% 1.02x
ProtocolConformance.o 4031 3983 -1.2% 1.01x
DiffingMyers.o 6909 6829 -1.2% 1.01x
DataBenchmarks.o 59879 59231 -1.1% 1.01x
Array2D.o 2981 2949 -1.1% 1.01x

Performance (x86_64): -Osize

Regression OLD NEW DELTA RATIO
ObjectiveCBridgeStubFromNSDate 6270 7560 +20.6% 0.83x (?)
DictionaryKeysContainsNative 26 30 +15.4% 0.87x (?)
 
Improvement OLD NEW DELTA RATIO
XorLoop 1890 394 -79.2% 4.80x
ArrayAppendReserved 1480 460 -68.9% 3.22x
FlattenListLoop 4345 1693 -61.0% 2.57x
ArrayPlusEqualFiveElementCollection 8325 3367 -59.6% 2.47x
ArrayPlusEqualSingleElementCollection 1927 799 -58.5% 2.41x
RC4 401 172 -57.1% 2.33x
ArrayAppend 1700 780 -54.1% 2.18x
BucketSort 330 196 -40.6% 1.68x
AngryPhonebook.Armenian 259 207 -20.1% 1.25x
StringFromLongWholeSubstring 5 4 -20.0% 1.25x
AngryPhonebook.Cyrillic 276 223 -19.2% 1.24x
AngryPhonebook.Strasse 217 183 -15.7% 1.19x
Breadcrumbs.MutatedUTF16ToIdx.Mixed 304 265 -12.8% 1.15x (?)
NSStringConversion.MutableCopy.UTF8 1045 924 -11.6% 1.13x (?)
AngryPhonebook.Cyrillic.Small 587 523 -10.9% 1.12x (?)
MonteCarloE 10820 9740 -10.0% 1.11x
AngryPhonebook.Armenian.Small 569 517 -9.1% 1.10x (?)
NSStringConversion.MutableCopy.Rebridge.UTF8 846 774 -8.5% 1.09x (?)
AngryPhonebook.Strasse.Small 646 595 -7.9% 1.09x (?)
ArraySubscript 1208 1120 -7.3% 1.08x (?)

Code size: -Osize

Improvement OLD NEW DELTA RATIO
XorLoop.o 1999 1368 -31.6% 1.46x
ArraySubscript.o 3085 2382 -22.8% 1.30x
RC4.o 3387 3085 -8.9% 1.10x
BinaryFloatingPointProperties.o 5271 5111 -3.0% 1.03x
NopDeinit.o 4412 4288 -2.8% 1.03x
PrimsNonStrongRef.o 86729 84381 -2.7% 1.03x
BucketSort.o 8608 8398 -2.4% 1.03x
Hash.o 19001 18557 -2.3% 1.02x
ArrayAppend.o 22817 22309 -2.2% 1.02x
MonteCarloE.o 2922 2857 -2.2% 1.02x
FlattenList.o 3930 3846 -2.1% 1.02x
Array2D.o 2717 2666 -1.9% 1.02x
ProtocolConformance.o 3786 3742 -1.2% 1.01x
StringEdits.o 10163 10048 -1.1% 1.01x
RemoveWhere.o 13615 13473 -1.0% 1.01x

Performance (x86_64): -Onone

Regression OLD NEW DELTA RATIO
StringBuilderWithLongSubstring 4350 4920 +13.1% 0.88x (?)
SIMDReduce.Int8x16.Initializer 617480 680102 +10.1% 0.91x (?)
String.data.Small 81 89 +9.9% 0.91x (?)
 
Improvement OLD NEW DELTA RATIO
AngryPhonebook.Armenian 259 208 -19.7% 1.25x
AngryPhonebook.Cyrillic 276 223 -19.2% 1.24x
AngryPhonebook.Strasse 217 184 -15.2% 1.18x
Breadcrumbs.MutatedUTF16ToIdx.Mixed 317 272 -14.2% 1.17x (?)
Breadcrumbs.MutatedIdxToUTF16.Mixed 337 292 -13.4% 1.15x (?)
DictionaryBridgeToObjC_BulkAccess 175 163 -6.9% 1.07x (?)

Code size: -swiftlibs

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

@eeckstein
Copy link
Contributor Author

@swift-ci smoke test linux

Copy link
Contributor

@meg-gupta meg-gupta left a comment

Choose a reason for hiding this comment

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

Thanks!

@eeckstein eeckstein merged commit 9de5d6e into swiftlang:main Aug 26, 2021
@eeckstein eeckstein deleted the fix-perf-regressions branch August 26, 2021 18:24
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.

3 participants