-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[nfc] [benchmark] [cxx-interop] Add "GlobalVars" benchmark to test static variables. #35318
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 please benchmark. |
1 similar comment
@swift-ci please benchmark. |
ef94a8d
to
7843859
Compare
@swift-ci please benchmark. |
Build failed before running benchmark. |
7843859
to
dff3e4e
Compare
…obal static vars. Tests performance of loading static C++ variables from Swift. Tests both constexpr and non-constexpr statics.
static BigObject globalBigObject = BigObject(); | ||
static constexpr BigObject globalConstexprBigObject = BigObject(); | ||
|
||
struct HasStaticConstexprMembers { |
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.
Funny enough, these tests actually fail because of undefined symbols without #35311.
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.
dff3e4e
to
9924c98
Compare
@swift-ci please benchmark. |
1 similar comment
@swift-ci please benchmark. |
Performance: -O
Code size: -OPerformance: -Osize
Code size: -OsizePerformance: -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
|
I'm going to go ahead and land this once the tests pass. @swift-ci please smoke test. |
@swift-ci please smoke test macOS. |
@swift-ci please smoke test Windows. |
1 similar comment
@swift-ci please smoke test Windows. |
@swift-ci please test Windows. |
@swift-ci please smoke test Linux. |
@swift-ci please test Windows. |
1 similar comment
@swift-ci please test Windows. |
Keep getting Java errors with the Linux CI. @swift-ci please smoke test Linux. |
@swift-ci please smoke test Linux. |
1 similar comment
@swift-ci please smoke test Linux. |
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 assume this benchmark should test that the code generation for loading globals is optimal.
For such trivial things, it's often better to add a lit test which e.g. checks if the SIL (or LLVM IR) looks optimal.
I think you're right. Especially now that I've had to remove about two-thirds of the tests. OK, I'll close it. |
Tests performance of loading static C++ variables from Swift. Tests both constexpr and non-constexpr statics.
Refs #35311.