Hey Matt, thanks for your reply! I am completely on-board with nearly all the things you wrote. I especially agree with your point that for most applications it doesn't really matter, even if Kotlin is slightly slower (or faster) than Java. You named high-speed trading as performance-sensitive application, where especially latency is the important variable.
My use case is also performance-sensitive but in terms of throughput, not latency. It uses 100% of the available processing power and a lot of memory, not because the design is bad but because task is quite complex. Let's say one run of the program takes 10 minutes with Java and Kotlin takes 10% more time, then we'll be at 11 minutes. Not great, but not catastrophic. But in cases where one run takes, say, 20 hours then 2 hours is quite a bit more in absolute terms, and I would feel it. Same goes for memory, if 10% more memory was to be used, it would be a relatively large argument against Kotlin, if it uses 44 GB instead of 40. (Now I'm not saying that Kotlin is necessarily this much more inefficient, just trying to make a point).
My main concern here is that Kotlin uses relatively old bytecode versions, along with their old feature sets, for some very similar features that Java has also introduced natively in the bytecode in the meantime (e.g. lambdas). This is likely going to get more as time goes on. But then - is Kotlin really less performant through-put wise than Java? I guess, in reality, it depends and is really tough to say. I just haven't really seen many efforts to investigate this. Unfortunately, sometimes it can also be really difficult to impossible to just try it out, hence I am currently trying to gather as much information, as I can.
After writing my original post if found
https://youtrack.jetbrains.com/issue/KT-35625#focus=streamItem-27-3880698.0-0 so I guess these potential concerns are on the roadmap anyway. Not tomorrow but the Kotlin devs are aware. It doesn't answer the question if Kotlin, right now, is significantly less performant than Java right now, but it suggests that in case that it currently is, it won't stay like that.
Also, totally agree with you on the time it takes to compile 🙂