Become a MacRumors Supporter for $25/year with no ads, private forums, and more!

iPhone Javascript Benchmarks

MacRumors

macrumors bot
Original poster
Apr 12, 2001
50,432
11,815
https://www.macrumors.com/images/macrumorsthreadlogodarkd.png

JohnMuch.com posted some Javascript benchmarks of the 8GB iPhone compared to his 2.4GHz Intel Core 2 Duo with 4GB of RAM. He ran a number of different online benchmarks including JSSpeed:

iPhone

Try/Catch with errors 378
Layer movement 3078
Random number engine (Did not compute)
Math engine 3474
DOM speed Testing… (998/1000)
Array functions 1739
String functions 535
Ajax declaration 1089
Total Duration: 10293 ms

Macbook Pro

Try/Catch with errors 5
Layer movement 33
Random number engine 28
Math engine 43
DOM speed 21
Array functions 10
String functions 11
Ajax declaration 8
Total Duration 159 ms

More benchmark results are available with links to tools to try yourself. [via Ajaxian]
 

notsofatjames

macrumors 6502a
Jan 11, 2007
856
0
Wales, UK
dammit! i was expecting my iPhone to keep up with my 8 core mac pro!! (by the way i have neither)

seriously, why didn't they compare this to another phone that can run javascript?
 
Comment

jettredmont

macrumors 68030
Jul 25, 2002
2,724
314
dammit! i was expecting my iPhone to keep up with my 8 core mac pro!! (by the way i have neither)

seriously, why didn't they compare this to another phone that can run javascript?

In the comments there is a test run against a Nokia running Opera 4 (beta), which is a small factor slower than the MacBook but nowhere near the several-orders-of-magnitude slowageness of the iPhone Safari. Specifically, he got 420 ms on the Noki, vs 159 on the Macbook Pro, and vs 10,293 ms on the iPhone.

Seems like something is majorly broken in either this guy's iPhone/Safari or in the Safari/iPhone software in general. There is NO WAY that it should be operating this slowly on things like layer movement (3 seconds alone) and AJAX initialization (another second). I can understand the math result, although it is highly disappointing (another three seconds there), as a function of the relatively anemic processor in there. But the rest is just plain sickening.
 
Comment

dashiel

macrumors 6502a
Nov 12, 2003
876
0
so much for "web 2.0" being the SDK. what a joke. crap javascript performance, doesn't interpret mouse events properly, no flash, no SVG support. we all know a true SDK is probably coming; jobs would have done better not to mention the web 2.0 thing at all.
 
Comment

elppa

macrumors 68040
Nov 26, 2003
3,232
114
That does seem very sluggish. Wonder what real world performance is like?
 
Comment

bignumbers

macrumors regular
May 9, 2002
206
0
i dont know if he was using dialup, but my iphone has no problem running these tests in about a quarter of the time...

That's just one test, but it is slower on my iPhone than even his tests. I ran it three times - 16172ms, 15581ms, 15745ms.

I'm not fretting by any means. I mean, it's a handheld.

Interestingly my MacBook Pro was in the 550ms range - much slower than his MBP tests.
 
Comment

bignumbers

macrumors regular
May 9, 2002
206
0
i have no idea what any of those numbers mean..lol :cool:

ms = milliseconds (thousandths of a second). The numbers represent how many milliseconds it took to perform a specific operation. The bottom number is the total amount of time to perform all operations within the test.
 
Comment

notsofatjames

macrumors 6502a
Jan 11, 2007
856
0
Wales, UK
That wouldn't make any difference. This is javascript, and runs in your browser.

but the javascript needs to be downloaded. Im not sure on how these things work, but how about someone try it with edge, and then try it with wifi and see if theres a difference for you.
 
Comment

humera

macrumors newbie
Jul 2, 2007
10
0
159ms on a Macbook Pro?

I ran these tests on my 3.0ghz quad core Mac Pro:

Firefox 2.0.0.4: 540ms avg
Safari 2.0.4: 256ms avg
iPhone: 9452ms avg
 
Comment

WildCowboy

Administrator/Editor
Staff member
Jan 20, 2005
17,509
1,495
Er, my PowerBook takes 14-15,000 ms on Safari...that's embarrassing. Firefox is more like 2300 ms.
 
Comment

dashiel

macrumors 6502a
Nov 12, 2003
876
0
That's just one test, but it is slower on my iPhone than even his tests. I ran it three times - 16172ms, 15581ms, 15745ms.

I'm not fretting by any means. I mean, it's a handheld.

Interestingly my MacBook Pro was in the 550ms range - much slower than his MBP tests.

were you running safari 3? he was. safari 3 is an order of magnitude faster than safari 2 at executing javascript. long the achilles heal of safari (terrible javascript performance), it looks life safari3 is going leap in front of the competition, or at least on par with opera.

5397 ms in safari 2 (dual 2Ghz G5)
0442 ms in safari 3 (dual 2Ghz G5)
 
Comment

Andrmgic

macrumors 6502a
Jun 27, 2007
531
1
In Safari 3 under windows Xp SP2, I get 266ms

Firefox 2.0.0.4 is somewhere around 900ish ms

IE 7 is around 1547ms

My rig:

Athlon 64 X2 4400+ @ 2.2ghz
2048mb pc3200 ddr
A8N-SLI Premium Motherboard
 
Comment

jellomizer

macrumors 6502
Sep 12, 2006
486
4
Upstate NY
Real World vs. Benchmark Tests.

The problem with benchmark tests is they can be easilly cheated. Many Internet Explorer Oddities are from the fact they tweeked the system to handle benchmarks better so they can say they were faster then netscape. This lead to a bunch of security problems. Odd Designes which slowed down real world work because you needed to do twice as much code to do something the Standards say it should work that way. Also bearly noticable vs. hardly noticeable. These benchmarks show a near full usage of the system. Most Javascripts just run for a split second after data is entered. The Order of Magintude of 10x may be the difference from a unnoticed changed in data to a flash and a change in data. You are not going to loose productivity from it. Unless you are doing 3D rendering on your Iphone over Javascript you will not notice the speed difference for most Ajax Apps. (Being the bandwith is normally the Major bottleneck)
 
Comment

MacD

macrumors member
Feb 9, 2005
86
38
300ms on a Mac Mini Intel Core Duo 1.8, and 10530ms on the iPhone.

So... my iPhone is a little over 35 times slower than my Mac Mini?.... OMG! What crap did Apple sell me? :p

Oh, and they cost me the same amount of $599.
 
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.