Hacker News new | ask | show | jobs
by modersky 2987 days ago
It's currently about as fast as Scala 2.12, which means it compiles at roughly 3000 lines/sec. However, it supports more aggressive incremental compilation than Scala 2 so at least in my projects, which are typically 50K to 100K lines, most compiles are under a second, and I rarely see compile times over 5 seconds.

There's ongoing performance work to make both Scala 2 and Scala 3 faster than they are now. A lot of what people perceive as slow compile times are actually other factors (such as inefficient macros or slow build tools).

1 comments

> However, it supports more aggressive incremental compilation than Scala 2

I'm not sure what you mean here... but Scala 2 and Dotty have the same incremental compiler, and their independent bridges feature overall the same quality (which is high and heavily battle tested, for those interested).

It has to do with what kind of dependencies the incremental compiler wrapper (e.g. zinc) can extract from the baseline compiler (e.g nsc or dotc). The Scala 3 compiler dotc handles that itself, which has the potential to achieve better accuracy. But I am not sure how much it matters in practice. We'll find out.
> which has the potential to achieve better accuracy

The quality of the used names extraction affects accuracy, but not compile speed. I must say, Dotty and Scala are extracting about the same amount of dependencies, with some corner cases being covered better in Dotty (for example, changes in constant values).

I don't see a way Dotty can become a faster incremental compiler that doesn't involve adding the incrementality in the compiler.

I'm not sure if you noticed, but you are replying to the designer of Scala.
I think jvican noticed this. jvican is the engineer from Scala Center which is supported by EPFL.

Edit: typo

Oh, my bad then haha!