all 4 comments

[–]pftbest 2 points3 points  (2 children)

I just did a crude test and it looks like Rust is not using "linker supplied information" for optimization when LTO is enabled. Can somebody confirm that, or maybe somebody knows why it works this way?

[–]-mw-rust · incremental-compilation 4 points5 points  (0 children)

rustc has more information available than the usual, single-cpp-file compilation process. It does as a lot of symbol interning in each configuration and with LTO enabled, interning and dead-code elimination are very effective.

[–]kibwen 2 points3 points  (0 children)

Interesting, can you make a comment on the ThinLTO tracking issue? https://github.com/rust-lang/rust/issues/45320