Compilation speed


One of the stated goals of Kotlin is to compile at least as fast as Java.

This, plus the 100% java interoperability, are some of the key points that attract me to Kotlin.

In the current state, using the Kotlin plugin in IntelliJ, I find compilation takes about 2-4x longer than java (one example, from 3 seconds to 11 seconds).

This is something that keeps me from using Kotlin currently.  I develop games using Java/libgdx and the fast compilation cycle is critical for iterative testing.  I would really like to use Kotlin, though.

Assuming it is not because of incorrect settings on my part, is there a roadmap for optimizing compilation speed for Kotlin? Also, is the goal for compiling as fast as Java still considering achievable?



Yes and yes. Our goal is to compile as fast as Java and we are working on this at the moment


To me it wouldn't matter much if the Kotlin compiler took a little more time than the Java compiler as long as incremental compilation exists to some degree. I'm currently porting a little Java spare time application to Scala. Have to do that for my curriculum as knowledge of some other JVM language is often considered a plus. At the moment Kotlin is to little known. That little application consists of about 10 classes and takes ages to compile in Scala. Maybe Scala's very strict type system is causing this. I don't know. Anyway, the D programming language ( is also very feature rich like Scala. It even has immutable objects and pure functions (which you can't have on the JVM because of its restrictions), but compiles much faster than Scala and surely than C++. I don't know what is happening in Scala's compiler.


We are working on incremental compilation at the moment