PriNova
11/02/2021, 11:23 AMfun main() {
val value: Int = 2
showValue<Int>(value)
}
inline fun <reified T> showValue(value: T) = println("$value")
The decompiled Java shows that the primitive int will be boxed into an Integer.
And the function-signature has an Object as parameter-type.
I think, although the reified function will be inlined, that the use of primitives, or whatever object for T, stays the same, because of inlining.
Is this possible?
Thank youephemient
11/02/2021, 3:51 PM-XX:+EliminateAutoBox
). so the impact of boxing may vary; measure before you worry too much about itPriNova
11/02/2021, 8:29 PMilya.gorbunov
11/03/2021, 4:22 PMephemient
11/04/2021, 12:12 AM