Skip to content

Commit f4a7472

Browse files
authored
Update 08_overflow.md
Added some context.
1 parent f14a047 commit f4a7472

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

book/src/02_basic_calculator/08_overflow.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ development,
7575
therefore it sacrifices runtime performance in favor of faster compilation times and a better debugging experience.\
7676
The `release` profile, instead, is optimized for runtime performance but incurs longer compilation times. You need
7777
to explicitly request via the `--release` flag—e.g. `cargo build --release` or `cargo run --release`.
78+
The `test` profile is the default profile used by `cargo test`. The `test` profile inherits the settings form the `dev` profile.
79+
The `bench` profile is the default profile used by `cargo bench`. The `bench` profile inherits from the `release` profile.
80+
Use `dev` for iterative development and debugging, `release` for optimized production builds,\
81+
`test` for correctness testing, and `bench` for performance benchmarking.
82+
83+
7884

7985
> "Have you built your project in release mode?" is almost a meme in the Rust community.\
8086
> It refers to developers who are not familiar with Rust and complain about its performance on

0 commit comments

Comments
 (0)