22 Comments Already

commenter
mcuadros Said,
July 2nd, 2007 @6:51 am  

http://celtickane.com/projects/jsspeed.php

On my N95 with Opera Mini 4 beta: 420ms

commenter
July 2nd, 2007 @8:09 am  

This is pretty discouraging. I myself am developing some small applications for the iPhone, and guess what, living in Switzerland I can’t get my hands on an iPhone either. Anyway the benchmarks let me suspect that I’ll have to review my animation codes, because they might slow down things even further…
Thanks alot for this insight ^^

commenter
mike kidder Said,
July 3rd, 2007 @12:17 am  

OK. either Safari is skipping some tests or it really is that fast. Safari on Windows XP is averaging approx 250ms on my laptop – Dell Latitude D810, IE was around 1200ms. Pretty fast if accurate.

commenter
Casey Said,
July 3rd, 2007 @12:13 pm  

A friend and I did our own testing and found something very interesting.

A call to a no-op function is taking an abnormally large amount of time. Something like 75ms for 1000 of them where in a desktop browser it’s taking around 1ms. We had a bunch of other tests centered around mootools and the canvas tag that all came out fairly equally slow and the guess is that there is just some global overhead to function calls that’s accounting for the general slowness rather than problems with particular API’s (whose core functionality seems quite fast for a small device when you subtract out the appropriate function overhead).

You can run the tests here: http://lowtidegames.com/test/shapesonly.html (note: it does send the results to our server for easily getting the results off the iPhone).

A sample iPhone run:

no-op took 0 milliseconds.
get context took 1 milliseconds.
canvas bunch took 11 milliseconds.
100 times empty loop took 2 milliseconds.
1000 times empty loop with nothing() took 74 milliseconds.
set fillStyle 100 times took 88 milliseconds.
set strokeStyle 100 times took 93 milliseconds.
100 strokes of 20px took 63 milliseconds.
100 10×10 fillRects took 38 milliseconds.
100 25 radius triangles stroked took 179 milliseconds.
100 25 radius triangles filled took 180 milliseconds.
100 25 radius triangles stroked with style each time took 277 milliseconds.
100 25 radius triangles filled with style each time took 271 milliseconds.
100 strokes of 10px with style each time took 78 milliseconds.
100 5×5 fillRects with style each time took 124 milliseconds.
line math 10000 times took 1456 milliseconds.

commenter
zAk Said,
July 17th, 2007 @1:44 pm  

Hi, I’ve been searching everywere and have been unable to find the ram specs for the iphone…

My educated guess would be a stick of 512 ddr2 or something similar, but alas, i havent been able to confirm this.

I also had a hunch that the phone shares its 4 or 8gb of flash for the ram.

Anyone know for sure?

commenter
val Said,
July 25th, 2007 @11:02 pm  

I don’t understand the purpose of this test!
Of course code running on an 700-800 MHz processor will be slower
than an intel 2.4ghz duo core processor.

So what sense

commenter
piprog Said,
July 31st, 2007 @4:20 am  

Val: 800 x 3 = 2.400, but here we are witnessing not 3x, but 50x (5000%) differences!!! This will kill iPhone as a platform, unless we go back to server side processing (i.e. pre-RIA/AJAX).

commenter
Aaron Said,
March 18th, 2008 @9:19 pm  

Try out the new version of Safari released today. The results from that Javascript benchmark page were bested by my 2.16GHz Core 2 Duo iMac with 3GB RAM.

commenter
August 27th, 2008 @7:02 am  

Another point to bear in mind, beyond usability, is that the processor running flat out interpreting Javascript will have a big impact on battery drain.

Perhaps the DOM is being stored and processed in static ram.

commenter
Dev Said,
August 30th, 2009 @3:02 pm  

Either Safari is skipping some tests or it really is that fast. Safari on Windows XP is averaging approx 250ms on my laptop – Dell Latitude D810, IE was around 1200ms. Pretty fast if accurate.

Pingback & Trackback
mygif
July 2nd, 2007 @2:19 pm  
mygif
July 17th, 2007 @2:11 pm  
mygif
October 21st, 2007 @1:16 pm  
mygif
December 17th, 2008 @11:39 pm  

Related Post

Please Leave Your Comments Below

Please Note: All comments will be moderated