Scala Compilation Speed on MacBook Pros
After deciding to take the plunge and buy the new MBP 15”, I thought a little benchmarking would be a nice confirmation that my “upgrade” made sense. Most times I use my laptop for Scala development and writing my blog. I thought I’d run some tests around the Scala compilation times for some well-known projects.
Here’s how I tested each project:
- Git cloned the project.
- Connected my laptop to the mains (to ensure no energy saving was sacrificing performance).
- Downloaded the world with:
sbt clean compile
- Ran a clean compilation four times and took the average, min and max times:
sbt "set offline := true" clean compile
Scala open source projects used:
- Model A => 2010 15” MBP 2.4GHZ i5, 8GB, SSD.
- Model B => 2014 15” MBP 2.2GHZ i7, 16GB, SSD. (This is not the 2015 model but is pretty close to it.)
Project | Average (s) | Minimum (s) | Maximum (s) | |||
---|---|---|---|---|---|---|
2010 | 2014 | 2010 | 2014 | 2010 | 2014 | |
Scalaz | 234 | 77 | 232 | 76 | 264 | 79 |
Spray | 183 | 49 | 173 | 48 | 203 | 52 |
Shapeless | 189 | 57 | 178 | 55 | 208 | 59 |