toggle

AAPL Stock: 501.73 ( + 4.06 )

iPhone slow to run Javascript?

updated 10:50 am EDT, Fri August 17, 2007

iPhone Javascript slow?


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.


by MacNN Staff

TAGS :

 Apple
toggle

Comments

  1. hybrid

    Fresh-Faced Recruit

    Joined: Apr 2004

    -1

    WTF do you expect?...

    It's a bloody PHONE, not a dual-core desktop machine.

  1. hybrid

    Fresh-Faced Recruit

    Joined: Apr 2004

    0

    Also...

    Java is not Javascript and vice-versa.

  1. dynsight

    Fresh-Faced Recruit

    Joined: May 2005

    0

    Comparison

    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.

  1. coldfusion1970

    Fresh-Faced Recruit

    Joined: Nov 2004

    0

    cray-z

    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?

  1. dogzilla

    Grizzled Veteran

    Joined: Sep 1999

    0

    Err...

    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.

  1. lockhartt

    Fresh-Faced Recruit

    Joined: Apr 2000

    0

    @dogzilla

    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.

  1. hybrid

    Fresh-Faced Recruit

    Joined: Apr 2004

    0

    Poorly written...

    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.

  1. ZinkDifferent

    Fresh-Faced Recruit

    Joined: Jan 2005

    0

    idiotic MacNN editor



    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!

  1. Mr. Strat

    Fresh-Faced Recruit

    Joined: Jan 2002

    -1

    Java just sucks

    Bottom line: Javascript sucks...always has...probably always will.

  1. Sondjata

    Fresh-Faced Recruit

    Joined: Oct 2000

    0

    N800 Javascript Faster

    http://soandsuch.blogspot.com/2007/08/n800-javascript-faster-than-iphone.html

Login Here

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

 
close
Photo
toggle

Network Headlines

toggle

Most Popular

10 Most Read

Recent Reviews

Powerbag Business Class Bag

Many companies currently offer battery packs and various accessories to keep smartphones and other gadgets charged when away from an o ...

Logitech Cube

The world of mice could often be described charitably as stagnant: it's an endless sea of ergonomic shapes that assume you're sitting ...

NewerTech and Targus USB Hubs For Gifts

A useful holiday present to resolve an ongoing frustration is a multi-port hub. Whether as a stocking stuffer, Chanukah present, or an ...

toggle

Most Commented

10 Most Discussed