Please help us by taking our survey
apple news/media reports

08/17/2007, 10:50am, EDT

Friday, August 17th

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.


Filed under: Apple

, , 12comments, del.icio.us, slashdot, digg, buzz


12 comments
Reader Reactions (Please use <i></i> for italic text)

subscribe to comments
for this article




Expand All   Global Settings
WTF do you expect?...
0
08/17, 11:00am, EDT
It's a bloody PHONE, not a dual-core desktop machine.
Fresh-Faced Recruit
Joined Apr 2004
User is offline
Also...
0
08/17, 11:02am, EDT
Java is not Javascript and vice-versa.
Fresh-Faced Recruit
Joined Apr 2004
User is offline
Comparison
0
08/17, 11:24am, EDT
My laptop is not as fast as an 8 Proc Intel XEON server...please make it faster.

I would be curious to see how the iPhone compares to other handheld devices (particularly phones) like the Curve, Blackjack, Palms, etc.

THAT would be a fair comparison.
Fresh-Faced Recruit
Joined May 2005
User is offline
cray-z
0
08/17, 11:57am, EDT
Has anyone done any research to see if the iPhone processor is as fast as a Cray super computer?

Is Apple trying to pull the wool over our eyes?
Fresh-Faced Recruit
Joined Nov 2004
User is offline
Err...
0
08/17, 12:32pm, EDT
I think you fellas are utterly and completely missing the point. The problem has 2 parts:

1) Javascript is slow enough on the iPhone as to be broken for some web-based apps. This is most likely due to a bug or bad architecture decision in iPhone Safari. I suspect this can/will be fixed soon - Apple has always had problems with its Javascript engine. But until they do, or provide a real SDK, noone will develop anything serious for the iPhone since its JavaScript speed is so hideous.

2) The slow speed *is* a problem in that apps written for general consumption on the web have to be re-written for the slow iPhone javascript interpreter, and may not work, period. I suspect this is why there is a Google Maps widget as opposed to it just running in the browser: Google Maps in the browser would have been so slow as to be unusable. Not as if you can use the Map widget offline, so why is it a separate widget? Problem is, without an SDK, the only people who can make their javascript-heavy apps usable are those that have been "blessed" by Apple.

Nobody cares about the comparison between a desktop and iPhone version - they only care about the comparison between native widgets and web apps.
Mac Enthusiast
Joined Sep 1999
User is offline
@dogzilla
0
08/17, 12:41pm, EDT
I couldn't agree more. If you are telling developers that web apps is the way to get on the iPhone, particularly via AJAX, then having a dismal javascript implementation is not acceptable.
Fresh-Faced Recruit
Joined Apr 2000
User is offline
Poorly written...
0
08/17, 12:48pm, EDT
If the issue isn't iPhone vs. Desktop performance, then the report should have said what you did... simply that Javascript performance on the iPhone is unacceptably slow.

Comparing it to a desktop machine just confuses the issue.
Fresh-Faced Recruit
Joined Apr 2004
User is offline
idiotic MacNN editor
0
08/17, 1:01pm, EDT


JAVA and JavaScript are two entirely different technologies, not even remotely related.

At least if you have to hire illiterate monkeys as your editors, get some that at least peripherally know the technologies they are writing about - dumb morons!
Fresh-Faced Recruit
Joined Jan 2005
User is offline
Java just sucks
0
08/17, 1:08pm, EDT
Bottom line: Javascript sucks...always has...probably always will.
Fresh-Faced Recruit
Joined Jan 2002
User is offline
N800 Javascript Faster
0
08/17, 1:41pm, EDT
http://soandsuch.blogspot.com/2007/08/n800-javascript-faster-than-iphone.html
Fresh-Faced Recruit
Joined Oct 2000
User is offline
additional comments:..1..2..Next
Your Comments

In order to post comments: If you are a registered member, please login with your MacNN Forums username and password otherwise please uncheck the checkbox below.


Registered Member?
macnn forums login:

macnn forums password:

Not a member of the MacNN forums? Register now for free.

RSS Feeds

Have the latest content delivered to your desktop via RSS. Use the links below to get access to a specific blog, news, or reviews feed.



  MacNN -all

  MacNN Reviews

  MacNN Podcasts

  iPodNN

  Electronista

  Left Lane News
Turn your laptop into CASH: Sell us your used laptop. Working or not. Get money FAST. Instant online quote. Shipping is FREE.

PowerBookMedic will fix any Apple laptop or iPod: We offer Parts, Hard Drives, Superdrives, Ram Upgrades & Repairs all backed up w/ our 1YR Warranty!

Check Out the VIERA from Panasonic!: Enter a New Visual Era with Panasonic VIERA HDTVs. An Enhanced Experience.

PowerBookMedic will fix any Apple laptop or iPod: We offer Parts, Hard Drives, Superdrives, Ram Upgrades & Repairs all backed up w/ our 1YR Warranty!

Check Out the VIERA from Panasonic!: Enter a New Visual Era with Panasonic VIERA HDTVs. An Enhanced Experience.

Mac Mini Covers and Skins: Buy Covers and Skins for your Apple Mac Mini at Mac Mini Covers now.

Buy from The Apple Store, iTunes.com, Amazon.com, TechDepot, OfficeDepot, Computers4Sure, or donate.