Closed rpwjanzen closed 2 years ago
Running the app just counts attempted I/O operations, not execution time, so there's no difference between debug and release. Cargo bench measures execution time and indeed it automatically runs in release mode. I agree it looks a little weird to show the app running in debug mode even if it doesn't matter. I'll consider adding a note or something.
Finally added a note.
The example output in the "Run and print I/O call usage" section is running the "benchmark" with "[unoptimized + debuginfo]". This example should be changed to be an example with optimizations turned on and debug information removed. IIRC, cargo bench does this automatically.