8471 shaares
203 private links
203 private links
That’s where the main usage of #[inline] comes from — it enables cross-crate inlining.
The benefit is not without a cost — the compiler implements this by compiling a separate copy of the #[inline] function with every crate it is used in, significantly increasing compile times.
Okay 👌
And 5 tips about good inlining