I wish we could have something similar - a quick o...
# random
t
I wish we could have something similar - a quick online benchmarking tool - for Kotlin 🙂 https://quick-bench.com/q/6tDxsmk3FMX55B8W1RrdiG_s7_k
s
I usually write two unit test cases and look at the measured execution time in the UI.
image.png
r
@Stefan Oltmann in that case the results would be not that accurate, because of jvm warm up, jit optimizations, etc... Using a microbenchmarking tool like jmh would give more accurate results
💡 1
t
yeah; @Stefan Oltmann here’s a video from @Sebastian Sellmair [JB] on this ->

https://www.youtube.com/watch?v=vx95YRlUTts

💙 1
s
Thanks for sharing. Will take a look.
👍 2
t
I am thinking of somebody can setup this microbenchmarking tool in a server and provide a web frontend 😛 @Sebastian Sellmair [JB] any plans to provide such tools (from JetBrains) ? 🙂
s
I really like the idea, but I doubt that JetBrains will be able to offer such a product soon: So its certainly open for anybody who is searching for a cool hobby project!
✔️ 3
s
Helpful video! 🙂
😻 1
f
t
@Frank Bouwens thanks for the share. does it have anything extra compared to https://godbolt.org/ ?
f
@theapache64 I don’t know, I haven’t used Kotlin Explorer before; I saw it was mentioned in an article talking about performance; So thought it would be relevant to someone here as well 😉 https://kotlinlang.slack.com/archives/CDFP59223/p1728277606388849
t
ah no worries. thanks for the links frank.
👍 1
that blog post in that thread seems more interesting than this conversation 😄 thanks again 😄
does it have anything extra compared to https://godbolt.org/ ?
@romainguy i think you’re the best person to answer about this 😉
f
( @Charlie Tapping fyi, your article has been mentioned in this channel 😉 )
r
The main benefits of Kotlin Explorer compared to Compiler Explorer are that it runs locally and on your device so:
1. It’s a lot faster 2. It does exactly what your device does
For #2, you can set flags in Compiler Explorer to make dex2oat support the same features as your device’s CPU, and most of the time you likely won’t care so it’s not a big deal
👍 1
t
understood. thanks for responding 🤝
r
Also dex2oat on compiler explorer only goes through D8 and not R8
(discovered that today)
I also found out that R8 in Compiler Explorer treats the kotlin-stdlib as a class path library which is not how it's compiled in your app, so the results aren't exactly the same. I need to talk to the folks who built this to see if we can fix it
👍 1