Marc Knaup
07/10/2019, 4:52 PMinline class Test(private val value: Byte) {
fun toLong() = value.toLong()
}
Would I get any noteworthy performance benefit from making toLong() inline?
In general I'm not sure how functions of inline classes are actually invoked. As static functions with the inline value as parameter?dalexander
07/10/2019, 4:59 PMMarc Knaup
07/10/2019, 5:00 PMmiha-x64
07/11/2019, 9:08 AMAs static functions with the inline value as parameter?Yes, that's true if inline instance is not boxed.
Would I get any noteworthy performance benefit from makingI think JIT will inline such a small method otherwise, and the result machine code will be the same.toLong()?inline