Result table

<td>
  iOS 3.1.3 (3GS)
</td>

<td>
  iOS 4 GM (3GS)
</td>

<td>
  % change
</td>
<td>
  15396ms
</td>

<td>
  13787ms
</td>

<td class="positive">
  -10.5%
</td>
<td>
  2411ms
</td>

<td>
  1917ms
</td>

<td class="positive">
  -20.5%
</td>
<td>
  1884ms
</td>

<td>
  1893ms
</td>

<td class="negative">
  +0.5%
</td>
<td>
  1044ms
</td>

<td>
  1239ms
</td>

<td class="negative">
  +18.7%
</td>
<td>
  143ms
</td>

<td>
  221ms
</td>

<td class="negative">
  +54.5%
</td>
<td>
  982ms
</td>

<td>
  850ms
</td>

<td class="positive">
  -13.4%
</td>
<td>
  1355ms
</td>

<td>
  1065ms
</td>

<td class="positive">
  -21.4%
</td>
<td>
  2053ms
</td>

<td>
  1511ms
</td>

<td class="positive">
  -26.4%
</td>
<td>
  1616ms
</td>

<td>
  1916ms
</td>

<td class="negative">
  +18.6%
</td>
<td>
  3908ms
</td>

<td>
  3175ms
</td>

<td class="positive">
  -18.8%
</td>
Test
Total
3D
Access
Bitops
Controlflow
Crypto
Date
Math
Regexp
String

Thoughts

After running these SunSpider tests, it looks like overall there’s significant speed gains between iOS 3.1.3 and iOS 4 GM. However, it’s concerning from these tests there were some things that actually ran slower on iOS 4. This either represents a real speed loss between the versions, a margin of error, or some flaw or inconsistency while testing. Or maybe I possibly have some wrong setting on my phone? Any input would be appreciated.

Testing methodology

Test: SunSpider 0.9.1

Device: iPhone 3GS

The test was run five separate times on the same phone for each version of the OS. The phone was completely turned off and on before each test.

The most extreme values of the five tests were thrown out, and the resulting four tests were averaged (sometimes from three tests when the values were very close together). I’m no statistics expert, so if you’d like to work it out for yourself, here are my raw test results:

SunSpider iOS 3.1.3 results (5 tests)

SunSpider iOS 4 results (5 tests)

Speed Test: iPhone 3GS Even Faster than Apple Claims