MacNN | Print: iPhone slow to run Javascript?

macnn

View this article at: http://www.macnn.com/articles/07/08/17/iphone.javascript.slow/
Friday, August 17,2007 @ 10:50am

iPhone slow to run Javascript?

A site makes the claim that the iPhone's handling of Javascript is substantially slower than that of desktop systems, and even the code used in Apple's native iPhone applications. Running a simple benchmark test of the iPhone versus a 1.83GHz, Intel Core Duo Mac, the iPhone is on average more than 80 times slower at Javascript functions, sometimes as much as 90 times. As further proof, a simple plotting app is said to provide a tangible end-user difference.

Performance differences are said to be even more radical when, through hacking (see the iPhone Dev Wiki), a single piece of software is made to run on the iPhone (download) in versions for both Javascript and Apple's native codebase. While some basic functions can be only seven to nine times faster in native code, this shoots up to over 100 times faster with divisions, and a dramatic 226 times faster when it comes to function calls.

The site's author uses these figures as a plea to Apple, asking the company to deliver a "real" SDK to developers. Apple currently limits third-party development on the iPhone to web-based services, using languages such as Java and Ajax; the benchmarking results appear to support Apple CEO Steve Jobs' view, which is that Java is a "ball and chain" for the device.

Copyright ©1995-2005 Macintosh News Network, Inc. All rights reserved.