Skip to content

[benchmarks] Add a benchmark for printing using mirrors #32150

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
Jun 3, 2020

Conversation

airspeedswift
Copy link
Member

Two new benchmarks. One for using internal mirror reflection to convert types that don't conform to CustomStringConvertible to strings, and another for specifically getting a type's name as a string.

@airspeedswift
Copy link
Member Author

@swift-ci please benchmark

@airspeedswift
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Jun 2, 2020

Build failed before running benchmark.

@airspeedswift
Copy link
Member Author

@swift-ci please benchmark

@airspeedswift
Copy link
Member Author

benchmark failure seems unrelated

@swift-ci
Copy link
Contributor

swift-ci commented Jun 3, 2020

Build failed
Swift Test OS X Platform
Git Sha - bf3c4ae

@swift-ci
Copy link
Contributor

swift-ci commented Jun 3, 2020

Performance: -O

Regression OLD NEW DELTA RATIO
ObjectiveCBridgeStubFromNSDateRef 4660 5780 +24.0% 0.81x (?)
 
Added MIN MAX MEAN MAX_RSS
MirrorDefault 29811 31206 30279
TypeName 18407 19323 18750

Code size: -O

Regression OLD NEW DELTA RATIO
main.o 55611 56667 +1.9% 0.98x

Performance: -Osize

Regression OLD NEW DELTA RATIO
ObjectiveCBridgeStubFromNSDate 5920 7410 +25.2% 0.80x (?)
 
Improvement OLD NEW DELTA RATIO
String.data.Medium 123 106 -13.8% 1.16x (?)
 
Added MIN MAX MEAN MAX_RSS
MirrorDefault 29552 30580 29919
TypeName 20136 20887 20391

Code size: -Osize

Regression OLD NEW DELTA RATIO
main.o 45963 46827 +1.9% 0.98x

Performance: -Onone

Regression OLD NEW DELTA RATIO
ObjectiveCBridgeStubFromNSDate 5840 6780 +16.1% 0.86x (?)
StringToDataMedium 4300 4900 +14.0% 0.88x (?)
DataReplaceSmallBuffer 10900 11900 +9.2% 0.92x (?)
 
Added MIN MAX MEAN MAX_RSS
MirrorDefault 31266 32166 31601
TypeName 23635 24175 23845

Code size: -swiftlibs

Benchmark Check Report
⛔️⏱ TypeName execution took at least 14399 μs.
Decrease the workload of TypeName by a factor of 16 (100), to be less than 1000 μs.
⛔️⏱ MirrorDefault execution took at least 27904 μs.
Decrease the workload of MirrorDefault by a factor of 32 (100), 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

@airspeedswift
Copy link
Member Author

@swift-ci please smoke test and merge

1 similar comment
@airspeedswift
Copy link
Member Author

@swift-ci please smoke test and merge

@airspeedswift
Copy link
Member Author

@swift-ci please smoke test Linux

@airspeedswift airspeedswift merged commit baa3a7d into swiftlang:master Jun 3, 2020
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