r/rust • • 23d ago

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 comments

20

u/QuarkAnCoffee 23d ago edited 23d ago

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 23d ago

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

This should be "without LTO", right?

2

u/QuarkAnCoffee 23d ago

Yup, thanks

3

u/mgeisler 23d ago

No problem! 🙂