-
Notifications
You must be signed in to change notification settings - Fork 251
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
Set the default optimization level to 3 for testing #1443
Conversation
to disable this. (As well as the fact that much of our code essentially requires optimization to run at all reasonably, this ensures that we are testing the code as it is compiled for release builds.) Signed-off-by: Daira-Emma Hopwood <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1443 +/- ##
=======================================
Coverage 63.22% 63.22%
=======================================
Files 128 128
Lines 14865 14865
=======================================
Hits 9398 9398
Misses 5467 5467 ☔ View full report in Codecov by Sentry. |
@@ -123,6 +123,10 @@ lto = true | |||
panic = 'abort' | |||
codegen-units = 1 | |||
|
|||
[profile.test] | |||
opt-level = 3 |
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.
We should experiment with Cargo profile overrides to just optimize the math-heavy dependencies: https://docs.rust-embedded.org/book/unsorted/speed-vs-size.html#optimizing-dependencies
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.
It's not necessary to block making this change (which is also in #1603) on doing that. We can do so as well to further improve build+test times, but this is already a strict improvement on both the time and debugging QoL axes over --release
, and you can override it with --profile=dev
when you need to.
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.
Filed as #1606.
Superceded by #1603. |
Use
--profile=dev
to disable this. (As well as the fact that much of our code essentially requires optimization to run at all reasonably, this ensures that we are testing the code as it is compiled for release builds.)An advantage of this over using
--release
when running tests is that it builds with full debug information (as far as possible given that some things will be optimized out).