Schrep’s Blog

Schrep’s random mumblings

« Previous

What can you do when your browser is 7 times faster?

22 August 2008

Andreas Gal, Brendan Eich, Dave Anderson, Mike Shaver, and a whole host of other super-smart folks at Mozilla have been working hard to bring a Trace-tree based Just-in-time compiler to Firefox. I was a little curious about what sort of things you could do with this new found speed - so I hacked together a demo of some photo editing operations in the browser. It runs about 7x faster using the JIT than Firefox 3. From what I understand there are some very straightforward optimizations for the tracing work (basically specializing for the fact that we are loading/storing ints into the array) that can probably speed this up around 2-4x very soon.

Click on the image below to watch a 1 minute screencast of it in action - or you can try it yourself here (I’d recommend you use the latest Firefox nightly with JIT turned on - but the demo works in Firefox 3 and Webkit nighties).


Posted in mozilla | Trackback | del.icio.us | Top Of Page

    17 Responses to “What can you do when your browser is 7 times faster?”

  1. kain Says:

    Interesting, I’m curious to take a look at how this compares to SquirrelFish

  2. Other Programmer Says:

    So, you want to ask me to develop new application to slow down the new JIT compiler ?! And we have being doing that from very long time and have become exceedingly efficient at it ….

  3. Martin Kou Says:

    Absolutely amazing :D

  4. Joseph M. Newcomer Says:

    The major question about JavaScript (as opposed to Java) is: IS IT SAFE?

    Evidence to date says that allowing JavaScript to run significantly increases (to near-certainty) the chance that malware of some sort will execute. I have found no reason to trust this technology, which I refer to as “JavaVirus”, and until I can control, ABSOLUTELY, exactly what the script does, I will not run it on any machine (right now, it is filtered out by three levels of firewall software). JavaScript is the preferred attack vector. Thinking that this technology has no consequences, and apparently ignoring EVERY POSSIBLE security aspect of this technology, is one of the greatest hazards this technology presents. I do not trust it, and I consider its promotion to be somewhere between unethical, immoral and sociopathic. I don’t care HOW fast anything runs in my browser if I can’t trust it.

  5. Will Says:

    Way to spread the FUD, Joseph. How about pulling your head out of the sand and moving on with life.

  6. dubed Says:

    auh,
    silverlight/flash still rules.

  7. dafi Says:

    Faster JS means faster apps based on XUL.
    I’ve developer VisualDiffer
    http://dafizilla.sourceforge.net/visualdiffer/screenshots.php

    as extension for Komodo and many operations (like file comparison) suffer from JS performances.
    I hope to use tracemonkey on all XULRunner based application as soon as possible.

    Great people works on Mozilla!

  8. klaus Says:

    Looks like it doesn’t yet work in the latest x86_64 nightly?

  9. klaus Says:

    Joseph, JavaScript runs in a sandbox, very similar to the Java applet sandbox. And “three levels of firewall software”, now you’re being ridiculous.

  10. Dennis Says:

    Joseph, maybe you should like reconfigure this amazing system of superb stacked firewalls you use to like filter out software in general. Both local and remote.

    In other news, kudos to the Mozilla team for this huge improvements in this difficult domain. Without doubt this will help to feature enrich the already rich Internet applications. I can only hope that the WebKit team will learn and catch-up in regards to their JS performance.

  11. Dennis Says:

    Another comment specially for dubed. Remember that Silverlight 1.1 basically is a JS driven canvas. ORLY? yes.. really. Tho we will all love the CLR based version of Silverlight, the majority of the currently Silverlight deployed websites running in Mozilla will benefit from these improvements.

    And since Adobe’s ‘involvement’ we can only expect that they might at least do ’something’ with the new found JS glory in Mozilla.

  12. skierpage Says:

    Fabulous. Mozilla site should have a page for “next-generation web awesomeness examples” like CSS3, interactive SVG, and processing.js, with a sub-page for “even more awesomeness coming with Firefox 3.1″. I try to tell people how great the HTML5 features in Safari and Firefox are and then have to search blogs to find examples.

    It’s funny that you made a .swf to publicize this work. Maybe you can get Jing to create screencasts using the tag with fallback to swf for lesser browsers.

  13. my Says:

    Just a 4 times faster here.

  14. Al Says:

    Well, this poor chap has to wait an eon anyway as my downloads rarely exceed 5k/sec being on a dialup modem, yes there are places that still have no better than a basic copper telephone wire to connect to the internet, so I clicked on the image, after all it said it would run the demo in 1 minute, so I waited 3 minutes, but it still didn’t happen?? maybe someone will put the pictures into words, or a series of screenshots to explain the improvements??? it would certainly be appreciated :-)

  15. Paercebal Says:

    Amazing.
    And congratulations to all the peoples involved.

    I agree with Al: I have DSL, but still, viewing the movie was painful. I am right now downloading the full 33mb SWF file hoping it will be enough to see it on the browser.

    As for Joseph, this improvement won’t probably decrease nor increase the current security of your browser. It will only make it faster. So, don’t get paranoid. Or next week, you’ll come here claiming to touch your keyboard only with gloves (”because, you know, the aliens…”).

  16. Bert Says:

    Although stated that your (great, fascinating) demo works with webkit, it doesn’t work with google’s new chrome browser? (Yes, of course it is new ;-)

  17. Somnath Banerjee Says:

    I could not run this demo on Chrome.
    That is somewhat understandable.

    But I could not even run it on IE7.
    Ami i doing anything wrong?
    I tried the following url:
    http://people.mozilla.com/~schrep/image12.html

    Best Regards, Somnath