Skip to content

Commit

Permalink
Change opt-level from 3 to 2 for the test profile.
Browse files Browse the repository at this point in the history
Signed-off-by: Daira-Emma Hopwood <[email protected]>
  • Loading branch information
daira committed Nov 2, 2024
1 parent c6db09b commit 2405364
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,19 @@ codegen-units = 1

[profile.test]
# Since we have many computationally expensive tests, this changes the test profile to
# compile with optimizations by default, but keep full debug info.
# compile with `opt-level = 2` by default, but keep full debug info.
#
# This differs from the release profile in the following ways:
# - it does not set `lto = true`, which increases compile times without substantially
# - it does not set `lto = true`, which would increase compile times without substantially
# speeding up tests;
# - it does not set `codegen-units = 1`, which increases compile times and is only
# - it does not set `codegen-units = 1`, which would increase compile times and is only
# useful to improve determinism of release builds;
# - it does not set `panic = 'abort'`, which is in any case ignored for tests.
#
# To get results as close as possible to a release build, use `cargo test --release`.
# To speed up compilation and avoid optimizations potentially resulting in lower-quality
# debug info, use `cargo test --profile=dev`.
opt-level = 3
opt-level = 2
debug = true

[workspace.lints.rust]
Expand Down

0 comments on commit 2405364

Please sign in to comment.