5 ms·
My big question (not answered in the FAQ) is will it be faster or slower than Scala 2.12? Having worked on a big Scala codebase, the slow compiler speed is one
by dzdt 9y ago
My big question (not answered in the FAQ) is will it be faster or slower than Scala 2.12? Having worked on a big Scala codebase, the slow compiler speed is one of the biggest downsides to the language.
- mping 9y agoThere was experimental work to see how fast a scala compiler could be, but I think it's still far from production ready, was more of an experimente: https://github.com/gkossakowski/kentuckymule https://github.com/gkossakowski/kentuckymule
- modersky 9y agoIt'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).
- jvican 9y ago> 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).
- Cyph0n 9y agoI'm not sure if you noticed, but you are replying to the designer of Scala.
- JiminHsieh 9y agoI think jvican noticed this. jvican is the engineer from Scala Center which is supported by EPFL. Edit: typo
- Cyph0n 9y agoOh, my bad then haha!
- modersky 9y agoIt 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.
- jvican 9y ago> 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.