-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix RangeIteration and StringWalk benchmarks' use of globals #27099
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
atrick
commented
Sep 10, 2019
…ical path. This benchmark was "accidentally" accessing a global variable in the main iteration loop, which is in some situations very expensive and has nothing to do with what the benchmark is trying to test.
@swift-ci benchmark |
@swift-ci smoke test |
Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
Code size: -swiftlibsHow 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.
Interesting; this was a weird pattern.
@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.
LGTM
@swift-ci smoke test |
Global variables are being used as if they are "free black holes". They might be even more expensive than actually calling blackHole. But the right thing to do is use local variables and pass them into a black hole at the end of computation.
@swift-ci smoke test |