Hey, FYI a few data points comparing Kotlin multip...
# multiplatform
Hey, FYI a few data points comparing Kotlin multiplatform between Kotlin/JVM, Kotlin/Native, Kotlin/JVM compiled with GraalVM native image and Kotlin/Wasm https://twitter.com/sdeleuze/status/1609960881760108546
👍 3
🎉 1
hmm. that's not my observation: https://ephemient.github.io/aoc2022/jmh-visualizer/index.html I'm not measuring build time, but execution times for K/N have been mostly consistently worse than GraalVM native-image (and both of them consistently worse than HotSpot)
kotlinx-benchmark isn't built for WASM yet so I don't have a comparison with that
Interesting, I will have a deeper look to you benchs. Mine is super basic and was raised as one where Kotlin/Native was super slow a few years ago, so it may have been optimized more than others.
As far as I remember, K/N is much slower, when there a lot of allocations of small/short-living objects
Yeah maybe my sample does not involve enough GC pressure.
The table above makes Kotlin/JVM look bad due to the huge size of the full JDK. It would be interesting so see how much this could be reduced by just using a dedicated runtime produced by jlink. I think it should be possible to bring that down to the range of GraalVM or maybe even better.
I don’t think peak RSS would be lower than GraalVM due to the JVM infra that need to be loaded regardless of how much is used in the app, but I agree that would be an interesting data point. Feel free to send a PR.