-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[benchmark] Add mock floating-point types for conversion benchmarks #33821
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
Conversation
@swift-ci benchmark |
Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
Code size: -swiftlibs
How to read the dataThe 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 Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not the best person to review this benchmark.
Can the warnings about naming (>40 chars) and workload (>1000 μs) be ignored?
@benrimmington Thanks for taking a look. I'll see if someone else can chime in as well on this. The warnings about the name length look to be false positives, as the suggested remedy is to use dots to break up the name--which we already do! The workload issue is definitely something I'm paying attention to; in all cases, the benchmarks are intended to perform under 1000 µs imminently, but if I change the workload upfront, then some of them will be very noisy as they'll run in the <20 µs range after the improvements land. |
Since I'm eager to see how much these benchmarks can be improved on CI with the mentioned PR, I'm going to go ahead and merge this. Happy to work with folks in the know to correct any naming issues that come up. |
This comment has been minimized.
This comment has been minimized.
1 similar comment
@swift-ci smoke test and merge |
This is a companion PR which includes, for benchmarking purposes, a protocol
MockBinaryFloatingPoint
with default implementations that allows easy creation of "newtypes" that wrap existing binary floating-point types.This permits performance testing of generic conversions between binary floating-point types where one or both are not known to the standard library, a scenario which is encountered in real-world libraries such as SwiftUI that convert between
CGFloat
and standard library types.