loke
06/20/2024, 3:26 PM@Ignore
declaration that I can add that will silence the warning: Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
In my case, I have benchmarked, and it does make a small difference (which matters, because this is in the inner loop of a language interpreter) so I definitely want to keep it.Riccardo Lippolis
06/20/2024, 3:30 PM@Suppress("NOTHING_TO_INLINE")
loke
06/20/2024, 3:33 PMRiccardo Lippolis
06/20/2024, 3:36 PMloke
06/20/2024, 3:37 PMloke
06/20/2024, 3:38 PMinline fun foo(x: String): Int = x.length
loke
06/20/2024, 3:39 PMNOTHING_TO_INLINE
to that, then Idea complains that the suppression is unnecessary.Riccardo Lippolis
06/20/2024, 3:40 PMRiccardo Lippolis
06/20/2024, 3:41 PMRiccardo Lippolis
06/20/2024, 3:41 PMloke
06/20/2024, 3:41 PMloke
06/20/2024, 3:41 PMloke
06/20/2024, 3:42 PMRiccardo Lippolis
06/20/2024, 3:42 PMloke
06/20/2024, 3:45 PMRiccardo Lippolis
06/20/2024, 3:48 PMDaniel Pitts
06/20/2024, 4:08 PMDaniel Pitts
06/20/2024, 4:09 PM@Suppress("NOTHING_TO_INLINE", "KotlinRedundantDiagnosticSuppress")
loke
06/22/2024, 6:09 PM