Skip to content

Add new benchmarks for NSString bridging to cover non-tagged cases #23433

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

Catfish-Man
Copy link
Contributor

Previously we were only testing converting tagged pointer NSStrings to Strings

@Catfish-Man Catfish-Man requested a review from moiseev March 19, 2019 23:51
@Catfish-Man Catfish-Man self-assigned this Mar 19, 2019
@Catfish-Man Catfish-Man requested review from lorentey and removed request for moiseev March 19, 2019 23:52
@Catfish-Man
Copy link
Contributor Author

@swift-ci please smoke benchmark

Copy link
Member

@lorentey lorentey left a comment

Choose a reason for hiding this comment

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

I had two notes, but otherwise it LGTM!

@swift-ci
Copy link
Contributor

Performance: -O

TEST MIN MAX MEAN MAX_RSS
Added
NSStringConversion.Long 924 925 925
NSStringConversion.LongUTF8 1172 1255 1200
NSStringConversion.Mutable 759 802 774
NSStringConversion.UTF8 1560 1620 1582

Code size: -O

TEST OLD NEW DELTA RATIO
Regression
NSStringConversion.o 1097 4967 +352.8% 0.22x

Performance: -Osize

TEST OLD NEW DELTA RATIO
Regression
DataAppendDataLargeToLarge 36600 50800 +38.8% 0.72x (?)
Improvement
StringBuilderLong 1420 1250 -12.0% 1.14x (?)
StringBuilderWithLongSubstring 1590 1480 -6.9% 1.07x (?)
Added
NSStringConversion.Long 898 898 898
NSStringConversion.LongUTF8 1166 1167 1166
NSStringConversion.Mutable 757 820 778
NSStringConversion.UTF8 1640 1688 1658

Code size: -Osize

TEST OLD NEW DELTA RATIO
Regression
NSStringConversion.o 1274 4556 +257.6% 0.28x

Performance: -Onone

TEST MIN MAX MEAN MAX_RSS
Added
NSStringConversion.Long 6809 7000 6893
NSStringConversion.LongUTF8 5070 5132 5091
NSStringConversion.Mutable 8943 9318 9181
NSStringConversion.UTF8 12200 12329 12248
Benchmark Check Report
⚠️ NSStringConversion.LongUTF8 execution took at least 1168 μs.
Decrease the workload of NSStringConversion.LongUTF8 by a factor of 2 (10), to be less than 1000 μs.
⚠️ NSStringConversion.UTF8 execution took at least 1573 μs.
Decrease the workload of NSStringConversion.UTF8 by a factor of 2 (10), to be less than 1000 μs.
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

@Catfish-Man
Copy link
Contributor Author

@swift-ci please smoke test and merge

1 similar comment
@Catfish-Man
Copy link
Contributor Author

@swift-ci please smoke test and merge

@Catfish-Man
Copy link
Contributor Author

Unrelated failure :/

@Catfish-Man
Copy link
Contributor Author

@swift-ci please smoke test and merge

5 similar comments
@Catfish-Man
Copy link
Contributor Author

@swift-ci please smoke test and merge

@Catfish-Man
Copy link
Contributor Author

@swift-ci please smoke test and merge

@Catfish-Man
Copy link
Contributor Author

@swift-ci please smoke test and merge

@Catfish-Man
Copy link
Contributor Author

@swift-ci please smoke test and merge

@Catfish-Man
Copy link
Contributor Author

@swift-ci please smoke test and merge

@Catfish-Man Catfish-Man force-pushed the measure-a-bridge-and-get-over-it branch from a72993f to d2a59e0 Compare March 21, 2019 21:17
@Catfish-Man
Copy link
Contributor Author

@swift-ci please smoke test and merge

1 similar comment
@Catfish-Man
Copy link
Contributor Author

@swift-ci please smoke test and merge

@Catfish-Man
Copy link
Contributor Author

Both platforms passed, so I'm going to merge this.

@Catfish-Man Catfish-Man merged commit 09cfd9e into swiftlang:master Mar 22, 2019
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