These benchmarks are good, they show that some constructs are slower than the other.
While Matt basically said that any Kotlin code is slower than Java as you will find null checks in bytecode for almost any Kotlin code.
Long time ago I saw benchmark showing that Kotlin with these null checks is even tiny bit faster (within error range) than Java. JWM JIT is pretty good in optimizations.
But even if we assume that null checks makes Kotlin slower, what does fractions of a second mean? Is it 0.1s or 0.0000001s per each check? The last one looks more like a truth so does it even make sense to mention it?
All I want to say, that it feels for me wrong to say that performance is a disadvantage of Kotlin.
I think average Kotlin code would be even faster than Java as usually in Kotlin you can write clean code without performance sacrifice.
06/27/2019, 9:12 AM
Yeah I see what you mean - it's a hard question to answer (especially on a podcast interview!) because there is a difference but it's not something the majority of application developers need to concern ourselves with (and if you did you probably wouldn't be using Java, but a systems language instead e.g. C, Rust)