You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
there are multiple locations where #[inline] is used in bytemuck and i doubt performance benefit of using #[inline(always)] may not be meaningful in many cases but for some latency sensitive cases, using #[inline(always)] may come in handy.
I've ran benchmarks on my project for cast and cast_ref and had about 30% latency benefit when using #[inline(always)]. If needed, I'll reproduce the benchmark code!
The text was updated successfully, but these errors were encountered:
Without looking into it deeply i would have expected opt-level of 3 (the default for the Release profile) to be sufficient.
However I'm happy to have clear examples of cases where it doesn't happen. Primary because that can probably be shown to a rustc dev and they might be able to fix the compiler itself to help not only bytemuck but possibly similar examples of missed small inlines in other crates.
there are multiple locations where #[inline] is used in bytemuck and i doubt performance benefit of using #[inline(always)] may not be meaningful in many cases but for some latency sensitive cases, using #[inline(always)] may come in handy.
I've ran benchmarks on my project for cast and cast_ref and had about 30% latency benefit when using #[inline(always)]. If needed, I'll reproduce the benchmark code!
The text was updated successfully, but these errors were encountered: