Hello,
I compiled the same project with two versions of Rust (1.89 and 1.90), here are the results:
** Full Build **
| Rust version | Mode | Compilation time | Warnings | Executable size |
|---|---|---|---|---|
| 1.89 | debug | 44.92s | 1 | 332385336 B |
| 1.89 | release | 2m 28s | 1 | 19461344 B |
| 1.90 | debug | 39.01s | 5 | 341001416 B |
| 1.90 | release | 2m 22s | 5 | 19438616 B |
** Incremental Build **
| Rust version | Mode | Compilation time | Warnings | Executable size |
|---|---|---|---|---|
| 1.89 | debug | 7.87s | 1 | 331651072 B |
| 1.89 | release | 1m 43s | 1 | 19457248 B |
| 1.90 | debug | 2.27s | 5 | 341001416 B |
| 1.90 | release | 1m 41s | 5 | 19438616 B |
Compilation time: slight improvement (1.90 < 1.89)
Executable size: larger in debug (1.90 > 1.89) , smaller in release (1.90 < 1.89)
Warnings: Detection of dead code that was not caught in version 1.89
I would appreciate your insights on why the executable size has increased in debug mode (in 1.90) but decreased in release mode. Could this be related to the LLD linker, the LLVM version, or perhaps new optimizations introduced in the compiler?
& Why is there a difference in the executable size between the full build and the incremental build in version 1.89?
Thank you in advance.