Skip to content

[stdlib] Mark _NativeDictionary._delete(at:) non-releasing #19666

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
Oct 3, 2018

Conversation

lorentey
Copy link
Member

@lorentey lorentey commented Oct 2, 2018

This eliminates a retain/release pair around calls to it when it doesn’t get inlined.

_delete is responsible for restoring hash table invariants after a removal. It moves elements around in complicated patterns, but it doesn’t release them.

This eliminates a retain/release pair around calls to it when it doesn’t get inlined.

_delete is responsible for restoring hash table invariants after a removal. It moves around elements in complicated patterns, but it doesn’t release them.
@lorentey
Copy link
Member Author

lorentey commented Oct 2, 2018

@swift-ci please smoke benchmark

@lorentey
Copy link
Member Author

lorentey commented Oct 2, 2018

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Oct 2, 2018

Build comment file:

Performance: -O

TEST OLD NEW DELTA RATIO
Regression
CStringLongAscii 3289 3538 +7.6% 0.93x
Improvement
DictionaryRemove 6241 4337 -30.5% 1.44x

Performance: -Osize

TEST OLD NEW DELTA RATIO
Improvement
DictionaryRemove 8500 7677 -9.7% 1.11x

Performance: -Onone

TEST OLD NEW DELTA RATIO
Regression
CStringLongAscii 3388 3644 +7.6% 0.93x
Improvement
ArrayOfPOD 859 781 -9.1% 1.10x (?)
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

@lorentey
Copy link
Member Author

lorentey commented Oct 2, 2018

cc @airspeedswift

Following a previous change that did this for Dictionary.
@lorentey
Copy link
Member Author

lorentey commented Oct 2, 2018

Set should be invited to this party, too.

@swift-ci smoke benchmark

@lorentey
Copy link
Member Author

lorentey commented Oct 2, 2018

@swift-ci please test

@swift-ci

This comment has been minimized.

@swift-ci
Copy link
Contributor

swift-ci commented Oct 2, 2018

Build comment file:

Performance: -O

TEST OLD NEW DELTA RATIO
Regression
CStringLongAscii 3289 3538 +7.6% 0.93x
Improvement
DictionaryRemove 6331 4443 -29.8% 1.42x
DictionaryRemoveOfObjects 22565 20974 -7.1% 1.08x

Performance: -Osize

TEST OLD NEW DELTA RATIO
Improvement
DictionaryRemove 8872 7975 -10.1% 1.11x

Performance: -Onone

TEST OLD NEW DELTA RATIO
Regression
CStringLongAscii 3391 3674 +8.3% 0.92x
Improvement
ArrayOfPOD 858 781 -9.0% 1.10x (?)
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

@lorentey lorentey merged commit 2b1b68f into swiftlang:master Oct 3, 2018
@lorentey lorentey deleted the dictionary-remove-is-slow branch October 3, 2018 10:46
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