7

I did a benchmark for compilation time on Scala 2.10.0 and 2.9.2, and have found that 2.10.0 took longer compilation time than 2.9.2.

In which case does it happen? Or can Scala 2.10.0 compiler be generally slower than 2.9.2 for certain reasons?

user207421
  • 305,947
  • 44
  • 307
  • 483
Kenji Yoshida
  • 3,108
  • 24
  • 39
  • 2
    I have compiled multiple projects now with both versions. 2.10 seems to be between 5% and 10% slower in average. For clean builds I had like 50, 65, 70 seconds in 2.9.2, compared to 55, 70, 72 seconds in 2.10. In other words, the speed is more or less the same (especially when using incremental building), although I would expect that 2.10.1 will have some optimisations. The only major component that changed in 2.10 is the pattern matcher. Otherwise there are probably a few more conditionals for the new features, SIP-18 etc. Performance tuning is the goal for 2.11. – 0__ Jan 08 '13 at 17:03
  • Surely you'll understand it's hard to answer you without more information. What was your benchmark about ? are there at least open source projects you could point to exhibiting different compilation speeds across scala versions ? – Francois G Jan 09 '13 at 09:14
  • @0__ 2.11 release is a little over 1 year away according to road map. Have yet to confirm your 5-10% slower observation; unfortunate if that is the case -- multi-project builds or bust. – virtualeyes Jan 28 '13 at 22:49

1 Answers1

0

On initial sbt start + clean/compile 2.10 appears to be faster than 2.9.x

However, on subsequent clean/compile cycles on 2.10, times remain the same, unlike 2.9.x where caches comes to the rescue and significantly reduce clean/compile cycles.

For example, I have a core project setup on both 2.9.2 and 2.10 (37 scala, 6 java)

The 2.9.2 project takes @50 seconds on initial clean/compile; 15 to 20 seconds max thereafter

[warn] 6 warnings found
[success] Total time: 16 s

The 2.1.0 project takes @40 seconds on initial clean/compile; @40 seconds thereafter.

[warn] 14 warnings found
[success] Total time: 45 s

Should note that the 2.9.2 project generates 6 warnings; the 2.10 project, 14 warnings.

Would be nice to see other results in this thread, only just started testing.

Not looking forward to converting entire application to 2.10 -- current build time is @100 seconds on 2.9.2; should be 200-300+ seconds on 2.10 if the above trend holds, yikes.

virtualeyes
  • 11,147
  • 6
  • 56
  • 91