Hey guys! For fun, I've translated my AI assignmen...
# kotlin-native
d
Hey guys! For fun, I've translated my AI assignment, which is basically a BFS graph search to Kotlin, and then compiled and benchmarked its runtime using the same input, compiled with different compilers. As you can see it's not even magnitudes slower in K/N, but also much slower if I compile it with the latest version. Can somebody elaborate on this? (I'm using Windows btw)
👍 2
🤔 1
https://pastebin.com/1N7X5VUw btw here's the code in a single file
o
Is it compiled with
-opt
? Where is input data?
d
Oh, I haven't checked out -opt before, now I see that it's slightly better with it, but still a bit worse than 0.9.3 (and 0.9.3 with
-opt
is the best) Here's the input: https://pastebin.com/hhMvNPz9
f
I remember seeing in the patch notes Kotlin native is two times faster and then thinking "wow! Now it's only 12 times slower than jvm..."
o
we will evaluate reasons of this behavior, as with most other runtimes “faster” or “slower” usually means behavior on set of benchmarks used by developers. This particular benchmark was not in this set, but we’ll add it.
k
I’ve been poking around a bit. I get 300ms as well for jvm, but 4500-5000ms for native in iOS/macOS.
Running the profiler, without doing a serious deep dive, it looks like the vast majority of time is in memory management
🤔 1
message has been deleted