Compiling Swift: What Hardware is Best?

I have two machines on my desk at work: a Mac Pro (Late 2013) and a MacBook Pro (Retina, 15-inch, Mid 2014). Let's see how quickly they each compile Swift from source.

I checked out the swift-DEVELOPMENT-SNAPSHOT-2016-06-06-a branch of each of Apple's Swift repositories, then performed a clean build, using the following commands:

$ cd apple/swift
$ rm -rf ../build
$ time utils/build-script -R

Here's the average of five builds on each of my machines, plus some readers have contributed, arranged from slowest to fastest:

Model Processor Memory User System Real
MacBook (12-Inch, Early 2016) 1.2GHz 2-Core Intel Core m5 8 GB 1866 MHz LPDDR3 SDRAM 12992.81s 436.32s 59:56.48
MacBook Pro (Retina, 15-inch, Mid 2014) 2.8 GHz 4-Core Intel Core i7 16GB 1600 MHz DDR3 8885.34s 471.48s 22:49.55
Mac Pro (Late 2013) 3.5 GHz 6-Core Intel Xeon E5 32 GB 1866 MHz DDR3 ECC 9623.72s 593.88s 18:06.09
iMac (Retina, 27-Inch, Late 2015) 4.0 GHz 4-Core Intel Core i7 Unknown 6818.61s 278.82s 17:45.50

Conclusion: On average, my Mac Pro compiles Swift in 78% of the time it takes my MacBook Pro. The iMac is slightly faster than even the Mac Pro. Meanwhile, the MacBook is certainly capable of compiling Swift from source, but if you become a regular committer to Swift, I'd recommend investing in a faster machine.

I'd be interested to hear how quickly Swift compiles on other machines. Tweet me if you have compilation times you'd like to share, or if you'd like me to experiment with incremental build times or something.