Skip to content

[benchmark] Add another test to floating point conversion benchmark #33975

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 3 commits into from
Sep 24, 2020

Conversation

xwu
Copy link
Collaborator

@xwu xwu commented Sep 16, 2020

This PR adds a benchmark to test the performance of the default implementation of BinaryFloatingPoint.init<T>(exactly:) where T: BinaryFloatingPoint.

It is a companion to #33910 and will need to be landed separately in order to demonstrate that the other PR produces the expected performance improvement.

@xwu

This comment has been minimized.

@xwu

This comment has been minimized.

@xwu

This comment has been minimized.

@xwu

This comment has been minimized.

@xwu

This comment has been minimized.

@xwu

This comment has been minimized.

@xwu
Copy link
Collaborator Author

xwu commented Sep 16, 2020

@swift-ci benchmark

@xwu
Copy link
Collaborator Author

xwu commented Sep 16, 2020

@swift-ci test Linux platform

@xwu
Copy link
Collaborator Author

xwu commented Sep 16, 2020

@swift-ci test macOS platform

@swift-ci

This comment has been minimized.

@xwu

This comment has been minimized.

@xwu

This comment has been minimized.

@xwu
Copy link
Collaborator Author

xwu commented Sep 17, 2020

@swift-ci test macOS platform

@xwu
Copy link
Collaborator Author

xwu commented Sep 17, 2020

@swift-ci benchmark

@xwu
Copy link
Collaborator Author

xwu commented Sep 17, 2020

@swift-ci test Linux platform

@swift-ci

This comment has been minimized.

@swift-ci
Copy link
Contributor

Performance: -O

Improvement OLD NEW DELTA RATIO
Dictionary4 196 150 -23.5% 1.31x
Dictionary4OfObjects 229 184 -19.7% 1.24x
ArrayAppendUTF16Substring 33552 30816 -8.2% 1.09x (?)
ArrayAppendAsciiSubstring 33552 30816 -8.2% 1.09x (?)
ArrayAppendLatin1Substring 34236 31464 -8.1% 1.09x (?)
 
Added MIN MAX MEAN MAX_RSS
ConvertFloatingPoint.MockFloat64Exactly 701 701 701
ConvertFloatingPoint.MockFloat64Exactly2 1047 1067 1054

Code size: -O

Regression OLD NEW DELTA RATIO
FloatingPointConversion.o 27007 41265 +52.8% 0.65x

Performance: -Osize

Regression OLD NEW DELTA RATIO
Dictionary4 155 290 +87.1% 0.53x
Dictionary4OfObjects 229 348 +52.0% 0.66x
ConvertFloatingPoint.MockFloat64ToDouble 14 16 +14.3% 0.88x (?)
NopDeinit 9900 11000 +11.1% 0.90x (?)
 
Improvement OLD NEW DELTA RATIO
ArrayLiteral2 113 102 -9.7% 1.11x (?)
CharacterLiteralsSmall 226 211 -6.6% 1.07x (?)
 
Added MIN MAX MEAN MAX_RSS
ConvertFloatingPoint.MockFloat64Exactly 694 694 694
ConvertFloatingPoint.MockFloat64Exactly2 1044 1044 1044

Code size: -Osize

Regression OLD NEW DELTA RATIO
FloatingPointConversion.o 25738 39406 +53.1% 0.65x

Performance: -Onone

Added MIN MAX MEAN MAX_RSS
ConvertFloatingPoint.MockFloat64Exactly 790 832 807
ConvertFloatingPoint.MockFloat64Exactly2 1640 1736 1672

Code size: -swiftlibs

Benchmark Check Report
⚠️ ConvertFloatingPoint.MockFloat64Exactly2 execution took at least 1006 μs.
Decrease the workload of ConvertFloatingPoint.MockFloat64Exactly2 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 mini
  Model Identifier: Macmini8,1
  Processor Name: 6-Core Intel Core i7
  Processor Speed: 3.2 GHz
  Number of Processors: 1
  Total Number of Cores: 6
  L2 Cache (per Core): 256 KB
  L3 Cache: 12 MB
  Memory: 64 GB

@xwu xwu requested a review from stephentyrone September 17, 2020 02:19
@xwu xwu changed the base branch from master to main September 24, 2020 02:59
@xwu xwu merged commit bb954f9 into swiftlang:main Sep 24, 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