Anyone tried running kotlin on the GraalVM? Any ex...
# random
h
Anyone tried running kotlin on the GraalVM? Any experiences to share?
g
You can do that, but without kotlin-reflect
h
Any notes on performance?
g
Actually, even official repo with samples contains AOT sample for Kotlin https://github.com/graalvm/graalvm-demos/tree/master/java-kotlin-aot
I suppose same as Java
Are you talking about AOT or VM usage?
h
oooh! There even was a demo! I never read the full thing. Should have.
I was thinking about general vm usage. But I'll look into the example (and some of my own projects) and see for myself. Thanks.
g
Some tests of Java with graal as VM that I saw show plus/minus same performance as OpenJDK 8, I suppose the same for Kotlin
g
This is AOT case, not VM
h
I came to wonder about graal when I read this: https://blog.playframework.com/play-on-graal/. Apparently, the GraalVM is better at «escape analysis», a notion I hadn't met before. Would such escape analysis in the graalvm be an advantage for kotlin programs too? Or maybe not? Or worse: is there some magic in the kotlin generated bytecode that would perform worse in the GraalVM?
g
Kotlin generated bytecode is pretty similar to java, and it’s just byte code after all
It should work for Kotlin too
but to be honest, we should see some significant performance gain on Java at least
h
Worth a shot then ... Will see when someone gets around to just doing some tests and posting the results.
g
My last comment was not exactly correct. I meant that I don’t see significant performance gain on Java in case of VM at least for some simple cases, probably make sense for a big high load service (Twitter uses Graal on production), so doesn’t look really interesting to use with Kotlin now for me Also, looks that Java 9 and 10 are faster in some basic tests (Graal is Java 8 compatible)