Skip to content

[stdib] Audit @_fixed_layout on collection storage classes #20519

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 2 commits into from
Nov 13, 2018

Conversation

lorentey
Copy link
Member

@lorentey lorentey commented Nov 12, 2018

  • Remove __SwiftNativeNSEnumerator from the ABI. (It’s only used in internal classes and in the Objective-C runtime.)
  • Remove inlinability of init() and deinit for all the __SwiftNativeNSFoo superclasses except Array’s and Data’s.
  • As an experiment, let’s try removing @_fixed_layout from _SetStorage and _DictionaryStorage. Their current ivars are all defined in their respective superclasses, so (if my mental model of how this works is correct), this will have little effect on benchmarks, but it adds a little bit of flexibility. Maybe.

- Remove __SwiftNativeNSEnumerator from the ABI. (It’s only used in internal classes and in the Objective-C runtime.)
- Remove inlinability of init() and deinit for all the __SwiftNativeNSFoo superclasses except Array’s and Data’s.
…eriment

The current ivars are all defined in the parent class, so (provided my mental model of how this works is correct) this may make some actual sense.
@lorentey lorentey changed the title [stdib] Audit @_fixed_layout for collection storage classes [stdib] Audit @_fixed_layout on collection storage classes Nov 12, 2018
@lorentey
Copy link
Member Author

@swift-ci please test

@lorentey
Copy link
Member Author

@swift-ci please benchmark

@swift-ci
Copy link
Contributor

Build comment file:

Performance: -O

TEST OLD NEW DELTA RATIO
Improvement
NopDeinit 52623 45432 -13.7% 1.16x
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
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ca09281

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ca09281

@lorentey
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ca09281

@jrose-apple
Copy link
Contributor

@swift-ci Please test

@lorentey lorentey merged commit 735b6ea into swiftlang:master Nov 13, 2018
@lorentey lorentey deleted the collection-layout-fixedness branch November 13, 2018 10:37
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