-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[benchmark] BenchmarkDoctor: Lower runtime bound + Set.Empty fixes #21717
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
For really small runtimes < 20 μs this method of setup overhead detection doesn’t work. Even 1μs change in 20μs runtime is 5%. Just return no overhead.
Warn about runtimes under 20 μs and flag 0 μs runtimes as errors.
Most of these recently added benchmarks have too low loop multiplier that results in near zero or zero measured runtime. Since fixing this will change the runtimes, it is also an opportunity to properly apply the new naming convention.
Let’s also test Empty sets as the right-hand side parameter.
@swift-ci please benchmark |
Build comment file:Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
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
|
Increase the multipliers to get reliably measurable runtimes.
@swift-ci please benchmark |
@lorentey @eeckstein Please review 🙏 I'm unsure if adding swapped
Do you want me to keep it? |
This comment has been minimized.
This comment has been minimized.
Clarified limit of accuracy in setup overhead detection.
@swift-ci smoke test |
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.
Looks good overall, but I have a minor naming concern and apparently there is a serious performance issue between raw integers and boxes.
@swift-ci please benchmark |
@swift-ci please smoke test and merge |
Build comment file:Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
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
|
@swift-ci please smoke test linux |
The new Set.Empty tests introduced in #20631 have too small workloads with runtimes near or at 0 μs. This needs to be fixed by adjusting the loop multipliers. In order to prevent this kind of error when writing new benchmarks, this PR extends
BenchmarkDoctor
with a check for lower runtime bound.