https://kotlinlang.org logo
Title
h

Hullaballoonatic

06/12/2018, 4:08 PM
how is kotlin so much faster than java while using the same bytecode?
a

Andreas Sinz

06/12/2018, 4:11 PM
Why do you think that kotlin is much faster?
👆 3
h

Hullaballoonatic

06/12/2018, 7:36 PM
I tested them side by side after converting some java code
maybe i just need to more tests
a

Andreas Sinz

06/12/2018, 7:56 PM
how did you test it? with JMH?
p

pavel

06/12/2018, 8:36 PM
Is your code doing the same things?
h

Hullaballoonatic

06/12/2018, 9:41 PM
yeah, i literally just used the coverter from java to kotlin, but i'll test it again later. i imagine there should be no reason it does?
p

pavel

06/12/2018, 9:45 PM
Well, in theory, since a lot of stuff is mutable in Java, but immutable in Kotlin, the compiler can do more optimisations. Otherwise ¯\_(ツ)_/¯
👍 1
h

Hullaballoonatic

06/12/2018, 9:45 PM
okay!
yeah kotlin is just a lot safer than java. it's easier to understand, i think. it took a lot of the great conventions of newer languages, but didn't leave itself so weakly typed as languages like javascript
g

Gerard Klijs

06/14/2018, 5:47 AM
Dynamic languages also have some great advantages, like being able to having a ‘real’ repl. I’ve seen some comparisons between java and kotlin, but the differences weren’t that big, and sometimes kotlin was slower.
✍️ 1
k

k4k4_dev

06/19/2018, 11:19 AM
@Hullaballoonatic home code testing hardly ever is reliable source of benchmarks.
🤝 1