3 ms·
I’d love someone more knowledgeable to correct this, but it’s my understanding that it does inline properly inside a crate, but across crate boundaries you must
by bluejekyll 8y ago
I’d love someone more knowledgeable to correct this, but it’s my understanding that it does inline properly inside a crate, but across crate boundaries you must mark a method as #[inline]...
- stochastic_monk 8y agoThat sounds like using gcc for C or C++ without link-time optimization. Edit for clarification: functions not marked as inline cannot be inlined when used in another translation unit unless LTO is enabled.
- steveklabnik 8y agoAs far as I know, that is true.
- hobofan 8y agoIsn't that only true for the default "release" profile? AFAIK you have to turn LTO on, if you want to get the most performance out of it (LTO isn't on in any profile by default), but it's also been some time since I last optimized to that extent.
- steveklabnik 8y agoI’m not sure to be honest, this is a corner of the language I find hard to remember.