twitter / reasonable-scala
- воскресенье, 20 августа 2017 г. в 03:15:32
An experimental Scala compiler focused on compilation speed
Reasonable Scala compiler (rsc
) is an experimental Scala compiler
focused on compilation speed. This project is developed by Eugene Burmako
and his team at Twitter.
At Twitter, we have one of the biggest Scala codebases on the planet,
and compilation time is consistently among the top asks from our engineers.
With rsc
, we seek to foster innovation in compilation performance,
openly prototyping performance-focused designs and making our findings
available to the Scala community at large.
Our project is inspired by the work of Martin Odersky and Grzegorz Kossakowski. Martin showed us that in this day and age it is still possible to write a Scala compiler from scratch. Greg showed us that compiling Scala can be blazingly fast.
We believe that it possible to achieve dramatic compilation speedups (5-10x) for typical Scala codebases, and we are currently well on track to realizing this vision.
It is too early to say this definitively. We are planning to start small with a trivial subset of Scala and then gradually add features, carefully measuring their impact on compilation performance. Ideally, we would like to make it possible for Scala programmers to easily reason about compilation performance cost of various Scala features and idioms.
Not all Scala programs will be compatible with Reasonable Scala, so a
Scalafix migration may be required
to use rsc
. However, all Reasonable Scala programs will be compatible with
Scala, so codebases that have been migrated will be crosscompilable.
Details will become clearer down the line, but keep in mind that we are
a large Scala shop, so we take compatibility extremely seriously.
We are planning to open source Reasonable Scala compiler in the near future. For now, star our project on GitHub and stay tuned for updates.