Conversation
MukjepScarlet
commented
Oct 2, 2025
- Make them hide to Java
- Make them inline for better performance
1. Make them hide to Java 2. Make them inline for better performance
|
For the second point: This won't have any effect, as inline was added to embed code instead of a lambda. Lookt at Kotlin inline the first part.
|
|
e.g. (stdlib) @SinceKotlin("1.1")
@kotlin.internal.InlineOnly
public actual inline fun maxOf(a: Int, b: Int): Int {
return Math.max(a, b)
}You can search |
|
When used like this The actual performance increase from this is likely very low or none at all, the JVM is probably smart enough to inline both function calls anyway, the most this will do is speed things up a little bit until JIT kicks in. It's not a bad change, but it's not likely to yield any improvement. |
|
Another purpose is to avoid auto completion like |