4 ms·
Summary: most stuff is within 5-10% of Java. In performance sensitive code be careful of the spread operator and foreach on ranges which have higher costs.
by richdougherty 9y ago
Summary: most stuff is within 5-10% of Java. In performance sensitive code be careful of the spread operator and foreach on ranges which have higher costs.
- dcow 9y agoExcept the parts where Kotlin actually beats Java.
- sk0g 9y agoIt was still within 5-10%, just on the other end of the scale!
- BurningFrog 9y ago5-10% is 3-6 months of Moore's Law.
- nine_k 9y agoIf it still held. "The free lunch is over" [1], and has been for years now. [1]:http://www.gotw.ca/publications/concurrency-ddj.htm http://www.gotw.ca/publications/concurrency-ddj.htm
- on_and_off 9y agoAre these results relevant though ? Kotlin is also costly when it needs to create an object in order to pass a function (like in a non inlined higher order function). So I would expect a comparison of the number of allocations too. From there it gets tricky because it really depends on the JVM you are running on in order to determine if this is going to generate enough pressure on the GC in order to have pauses, but that's a potential cost. Also .. in the end the results are not that different while the 2 languages have very different capabilities. Delegates, higher-order functions, nullability, data classes, ... Kotlin has a lot to offer.