Before I dive into the numbers, let’s talk briefly about what makes the iPhone 3G (and 2G) fundamentally different from the 3GS. The iPhone 3G, like the 2G, is based around a 412 MHz ARM11 family Samsung SoC which implements the ARMv6 instruction set. It’s got 128 MB of LPDDR1. By contrast, the iPhone 3GS uses a 600 MHz ARM Cortex-A8 family SoC which runs the ARMv7 instruction set, and packs 256 MB of LPDDR1. The iPhone 4 similarly runs ARMv7 code.
By nature of the two platforms running different instruction sets, their underlying iOS kernels are completely different, even though ARMv6 is a subset of ARMv7. In all likelihood, Apple embraces ARMv7 for speed gains on 3GS and 4, and therefore has to keep a separate kernel for ARMv6. That applied with iOS 3.x and applies the same way with iOS 4.x.
For whatever reason, it seems as though the kernel for ARMv6 devices like the iPhone 3G weren’t quite as optimized as they could have been. As a result, performance on iOS 4 with the iPhone 3G was sluggish.
Speed Testing the Platforms
Even while waiting in line for the iPhone 4, numerous iPhone 3G users I talked with noted a dramatic slowdown. Using one, I was amazed how sluggish things like even jumping in and out of the messaging application were. At the time, I wasn’t sure how much of this to attribute to the iPhone 3G just being an older device, or the iOS 4.0 update.
iPhone 3G users aren’t asking much, they just want the original speed and responsiveness of their devices back. For these tests, I borrowed a friend’s iPhone 3G and ran through a gamut of tests on iOS 3.1.3, iOS 4.0.2, and the iOS 4.1 GM which should be released September 8th. I also ran tests on an iPhone 3GS running 4.1 GM, though I’ve excluded results in two tables because the numbers destroy the dynamic range on the graphs for seeing change on the iPhone 3G.
iPhone 3G, iPhone 3GS, iPhone 4
Note that downgrading the iPhone 3G is easy since Apple isn’t enforcing SHSH blobs on it. If you can grab the image from any number of thoughtful repositories online, you can restore and downgrade with it. You might get stuck inside recovery mode at the end - but for that, simply use RecBoot.
Browser Testing
For all of these tests, I used a completely fresh, brand new restoration image with no other installed applications and connected to my 802.11n wireless network. I run tests three times and average, throwing out any outliers. Note that launching from a fresh install is critical on iOS as the platform saves a screenshot when closing, and immediately open that when relaunching so successive launches feel faster.
Our first test is the SunSpider JavaScript benchmark:
Unsurprisingly, the iPhone 3G on 4.0.2 and 4.1 beats 3.1.2. I say unsurprising because iOS 4.x brings a new version of WebKit with faster JavaScript engine. This is actually the one place where the 4.0.2 update helped the iPhone 3G. Note that the iPhone 3GS runs this test nearly 3x faster, taking 14707.8 ms.
Next up is Browsermark, which spits out an overall score representative of overall browsing responsiveness. There’s some JavaScript, some parsing, some rendering - it aims to be an all around general speed benchmark.
This is more along the lines of what people have been reporting with the iPhone 3G, though it isn’t quite as pronounced. iOS 3.1.2 scores higher than 4.0.2, but 4.1 closes the gap some. It still isn’t quite there, but has improved.
A similar test is to see how fast Safari rotates from landscape to portrait. On iOS 4.0.2, it’s measurably slower than 3.1.3, but how does 4.1 fare? Here we start the clock right as we rotate, and stop as soon as the page has rendered completely - you can tell when the text goes from fuzzy to sharp when Safari has completely rendered the page in the new orientation.
Here iOS 4.1 gets us close to how snappy 3.1.2 was but remains just a tad slower.