anyone got any fresh kotlin vs java runtime benchm...
# announcements
v
anyone got any fresh kotlin vs java runtime benchmark?
g
Benchmark of what? Most of bytecode is the same or very similar, it highly depends on which feature do you use and style that you prefer
v
I am interested in the object generation while iterating with for loop, specifically when using Ranges
k
They are optimized away at compile time.
g
So, you need not a “kotlin vs java runtime benchmark” but rather benchmark that compares loops
k
Go to tools > Kotlin > Show Kotlin bytecode and then if you want click decompile to see equivalent Java code.
g
also not sure that it make sense to compare using benchmark, just check bytecode
👍 1
v
okay, thanks
g
Yes, exatly what Karel said
decompile to see equivalent Java code
be careful with it, it can be very missleading, if you really care about micro benchmarking you should read byte code
k
It helps having them side-by-side to read the bytecode more easily simple smile
g
actually even bytecode is not enough, because this can be something completely different on runtime with JIT
c
I did a comparison of Imperative and function programming applied to FizzBuzz. https://github.com/corneil/compare-fp