My feedback on compiling with Rust 1.90 vs 1.89

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.

1 Like

I wouldn't be terribly surprised by lld being the majority of these differences (but who knows), excepting the additional warnings. I don't see anything in the changelog about about better (or at least louder) dead code detection, which is a little surprising.

1 Like

With version 1.89, it didn’t detect some unused enums as dead code, whereas version 1.90 did.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.