Skip to content

SILGen: Don't reabstract a member ref we're about to directly apply. #38658

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

Conversation

jckarter
Copy link
Contributor

SILGenApply can work with a function value at any abstraction level, so if we're loading a member out of an
aggregate that's stored at a different abstraction level than the substituted abstraction level, we can
just apply it the way it is without reabstracting.

SILGenApply can work with a function value at any abstraction level, so if we're loading a member out of an
aggregate that's stored at a different abstraction level than the substituted abstraction level, we can
just apply it the way it is without reabstracting.
@jckarter jckarter requested a review from slavapestov July 28, 2021 00:46
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter
Copy link
Contributor Author

@swift-ci Please benchmark

@swift-ci
Copy link
Contributor

Performance (x86_64): -O

Regression OLD NEW DELTA RATIO
DictionaryOfAnyHashableStrings_insert 3178 5558 +74.9% 0.57x
Set.isDisjoint.Box25 356 514 +44.4% 0.69x (?)
Set.isDisjoint.Int50 268 340 +26.9% 0.79x (?)
UTF8Decode_InitFromBytes_ascii_as_ascii 483 557 +15.3% 0.87x (?)
NSError 157 181 +15.3% 0.87x (?)
 
Improvement OLD NEW DELTA RATIO
FlattenListLoop 2492 1628 -34.7% 1.53x (?)
FlattenListFlatMap 6463 4363 -32.5% 1.48x (?)

Code size: -O

Performance (x86_64): -Osize

Regression OLD NEW DELTA RATIO
DictionaryKeysContainsCocoa 26 31 +19.2% 0.84x (?)
FlattenListFlatMap 3965 4299 +8.4% 0.92x (?)

Code size: -Osize

Performance (x86_64): -Onone

Regression OLD NEW DELTA RATIO
StringToDataMedium 4450 4950 +11.2% 0.90x (?)
DataAppendBytesMedium 4700 5180 +10.2% 0.91x (?)

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

@jckarter jckarter merged commit 4434ee9 into swiftlang:main Jul 28, 2021
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.

2 participants