[maemo-developers] javascript perf on the n770 and n800

From: Sean Jensen-Grey seanj at xyke.com
Date: Wed Jul 4 17:48:33 EEST 2007
I was wondering what the js perf is on the n770 and n800?

LowTideGames just wrote a game for the iPhone using a fair bit of
javascript and the <canvas> tag. But JS perf is so horribly slow 
that it does not run. Initially we thought it was a
poorly implemented <canvas> tag, this is not the case. Canvas tag runs
fine. It is javascript itself that is slow on the iPhone.

It appears that a NOP function takes about 70 microseconds. In our tests,
1000 executions of a function which does nothing took 74 milliseconds on
the iPhone.

There is a thread over on ajaxian about js perf on the iphone, and links
to,

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

iphone results,

http://ajaxian.com/archives/iphone-javascript-and-spec-benchmark

Could someone run the above benchmark (jsspeed) on an N770 and N800 and reply to this message?
We would like to to an idea of how much js compute power is available on
embedded internet devices. Esp Opera 9 embedded vs, iPhone Safari.

We also have a benchmark that measures the speed of the canvas tag.

http://lowtidegames.com/test/shapesonly.html

Note: This script posts the results of the test back to our server so we
could record the results from the iPhone.

jsspeed on a macbookpro, various browers, all times in milliseconds

firefox 2.0.0.4

Try/Catch with errors   52
Layer movement  148
Random number engine    126
Math engine     209
DOM speed       160
Array functions         70
String functions        196
Ajax declaration        46
Total Duration  1007 ms

Safari 3

Try/Catch with errors   6
Layer movement  45
Random number engine    37
Math engine     56
DOM speed       27
Array functions 14
String functions        15
Ajax declaration        10
Total Duration  210 ms

Opera 9.21

Try/Catch with errors   13
Layer movement  135
Random number engine    100
Math engine     124
DOM speed       59
Array functions 56
String functions        62
Ajax declaration        40
Total Duration  589 ms

Sean


More information about the maemo-developers mailing list