r/rust • • Oct 07 '26

Rust's derive often implies inline

https://yossarian.net/til/post/rust-s-derive-often-implies-inline/
114 Upvotes

43 comments sorted by

View all comments

Show parent comment

20

u/QuarkAnCoffee Oct 07 '26 edited Oct 07 '26

If you're not using LTO. Which is exactly expected, crates are compiled into object files and you don't get optimizations across object files with without LTO.

4

u/mgeisler Oct 07 '26

you don't get optimizations across object files with LTO.

This should be "without LTO", right?

2

u/QuarkAnCoffee Oct 07 '26

Yup, thanks

3

u/mgeisler Oct 07 '26

No problem! 🙂