Building WebKit on Retina MacBook Pro

My colleague Philip and I recently purchased brand new Retina MacBook Pros and measured the build time of WebKit on our laptops.

Philip got one with 2.7GHz Core i7 and 16GB of RAM with 256 GB of SSD whereas I got a cheaper one with 2.3GHz Core i7 and 16GB of RAM with 128GB of SSD. The reason I went with a slower CPU is because Ivy Bridge uses Intel Turbo Boost, I thought the extent to which processor can perform is only limited by the thermal performance of the heat sink and the rest. This turned out to be false to a large extent at least in terms of building WebKit.

To build WebKit, we installed Xcode 4.3.3. (with Command Line Tools as instructed) and Java for Mac OS X 10.7 Upgrade 1 Developer Package. I built WebKit revision 123074. Philip built WebKit of a similar revision (I expect it to be later than 123074 but no earlier than 123185).

Comparison of 2.7GHz and 2.3GHz Retina MacBook Pros

Release Build

Machine 1st build 2nd build 3rd build Average
2.7GHz, 16GB RAM, and 256GB SSD 18:58 18:56 18:55 18:56
2.3GHz, 16GB RAM, and 128GB SSD 21:04 20:57 20:57 20:59

Debug Build

Machine 1st build 2nd build 3rd build Average
2.7GHz, 16GB RAM, and 256GB SSD 18:47 18:48 18:46 18:47
2.3GHz, 16GB RAM, and 128GB SSD 20:47 20:58 20:53 20:53

In my repeated measurements, I built release and debug builds in turn after executing rm -rf WebKitBuild to minimize the effects of various caches.

While debug builds have some small variance and release builds have one outliner, the numbers are stable enough that we’re pretty confident to conclude that there is roughly 41±10 seconds or 8.9±1.5% improvements from the 2.3GHz version to the 2.7GHz version for release builds and 46±8 and 10±2% improvements for debug builds. Given that the frequency difference is only 17% between the two processors, 8 to 10% gain in the build performance is quite remarkable even considering the price difference of 2,399.00and3,249.00.

Effect of Enabling FileVault 2

Because data on SSD cannot be erased once the block that contains the data reaches its write limit, I wanted to enable the whole disk encryption on my MacBook Pro from day one. As such, I wanted to measure the effect of enabling the built-in File Vault 2 on WebKit build time. The result is quite astonishing and I’m quite impressed with what Apple did here.

Retina MacBook Pro with 2.3GHz Core i7, 16GB RAM, and 128GB SSD with FileVault 2

Configuration 1st build 2nd build Average
Release 20:52 20:49 20:51
Debug 20:40 20:40 20:40

In other words, the build time improved by roughly 10 seconds (~1%).


New Retina MacBook Pro can build WebKit in 21 minutes, and choosing 2.7GHz Core i7 improves the WebKit build time by roughly 12% from the cheapest 2.3GHz option. Enabling FileVault 2 whole disk encryption has almost no effect (or possibly some positive effect) on WebKit build time.


Philip Rogers and his Google+ post.