What can you do when your browser is 7 times faster?
22 August 2008Andreas 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).

17 Responses to “What can you do when your browser is 7 times faster?”
August 23rd, 2008 at 8:17 am
Interesting, I’m curious to take a look at how this compares to SquirrelFish
August 23rd, 2008 at 9:22 am
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 ….
August 23rd, 2008 at 2:22 pm
Absolutely amazing
August 23rd, 2008 at 7:51 pm
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.
August 23rd, 2008 at 11:23 pm
Way to spread the FUD, Joseph. How about pulling your head out of the sand and moving on with life.
August 24th, 2008 at 12:39 am
auh,
silverlight/flash still rules.
August 24th, 2008 at 2:10 am
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!
August 24th, 2008 at 2:49 am
Looks like it doesn’t yet work in the latest x86_64 nightly?
August 24th, 2008 at 3:04 am
Joseph, JavaScript runs in a sandbox, very similar to the Java applet sandbox. And “three levels of firewall software”, now you’re being ridiculous.
August 24th, 2008 at 9:43 am
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.
August 24th, 2008 at 9:48 am
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.
August 24th, 2008 at 7:22 pm
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.
August 25th, 2008 at 2:15 am
Just a 4 times faster here.
August 28th, 2008 at 5:35 pm
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
September 1st, 2008 at 1:52 pm
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…”).
September 2nd, 2008 at 12:23 pm
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
September 8th, 2008 at 11:48 am
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