this post was submitted on 23 Jan 2025
6 points (80.0% liked)
Rust
6245 readers
16 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
@Doods are you using
release
? If you want the best dead-code elimination, you can also enable Link time optimisations (LTO): https://doc.rust-lang.org/cargo/reference/profiles.html#ltoYes, I am using both LTO and release mode, I can show you:
cargo build --release
@Doods I'm surprised you can gain that much with that already enabled!
Should I bring it up to the 'min-sized-rust' working group or the forums or something?
Yes. This behavior seems strange, so either an explanation or investigation by a compiler dev seems like it would be helpful.
Just so you know I figured it out, re-read the post please.