Member Sign In
Not a member?

A Wired.com user account lets you create, edit and comment on Webmonkey articles. You will also be able to contribute to the Wired How-To Wiki and comment on news stories at Wired.com.


It's fast and free.

Sign in with OpenID
Sign In
Webmonkey is a property of Wired Digital.
processing...
Join Webmonkey

Please send me occasional e-mail updates about new features and special offers from Wired/Webmonkey.
Yes No

Please send occasional e-mail offers from Wired/Webmonkey affiliated web sites and publications, and carefully selected companies.
Yes No

I understand and agree that registration on or use of this site constitutes agreement to Webmonkey's User Agreement and Privacy Policy.
Webmonkey is a property of Wired Digital.
processing...

Retrieve Sign In

Please enter your e-mail address or username below. Your username and password will be sent to the e-mail address you provided us.

or
Webmonkey is a property of Wired Digital.
processing...

Welcome to Webmonkey

A private profile page has been created for you.
As a member of Webmonkey, you can now:
  • edit articles
  • add to the code library
  • design and write a tutorial
  • comment on any Webmonkey article
Close
Webmonkey is a property of Wired Digital.

Sign In Information Sent

An e-mail has been sent to the e-mail address registered in this account.
If you cannot find it in your in-box, please check your bulk or junk folders.
Sign In
Webmonkey is a property of Wired Digital.

Firefox 3.1: Speeding Up the Web With Supercharged JavaScript

Ff31jsThe upcoming release of Firefox 3.1 will make many of your favorite, complex web-apps, like Gmail, run considerably faster thanks to some much improved JavaScript tools in the browser.

While many still see JavaScript as an awkward way to validate forms or add a little spice to otherwise dull web pages, some sites are using JavaScript to go far beyond its humble beginnings. In fact, many developers see JavaScript as the future of the web.

To help JavaScript along, Mozilla says Firefox 3.1 will give JavaScript a much-needed shot in the arm with its new TraceMonkey JavaScript tool. According to Mike Shaver, Mozilla’s VP of Engineering, the new tools in TraceMonkey allow JavaScript code to render on par with native code.

“The goal of the TraceMonkey project — which is still in its early stages,” cautions Shaver, “is to take JavaScript performance to another level, where instead of competing against other interpreters, we start to compete against native code.”

While part of the gain will be for Ajax-heavy web apps, the new code will also improve Firefox itself since extensions and other Firefox tools are written in JavaScript.

Apple’s Safari has already been experimenting with its own new JavaScript engine, SquirrelFish, which uses similar techniques to achieve impressive new rendering speeds. SquirrelFish is scheduled to arrive in Safari 4.

The new JavaScript engines in both browsers use a technique called “trace tree” to improve JavaScript performance. The idea, based on a technique developed by researchers at UC Irvine, uses a tracing mechanism to record the execution path at runtime and then generates compiled code that can be used next time that a particular path is called.

The result is much better performance in the browser. How much better? In some cases Mozilla says the new tools can make JavaScript 20 to 40 times faster. To demonstrate TraceMonkey’s potential, Mozilla’s Mike Schroepfer put together demo app and found that even now, with many planned optimizations not yet available, the real world performance is about seven times faster than Firefox 3. Check out the video on Schroepfer’s blog, which shows a nightly build running alongside Firefox 3 — the improvements are quite dramatic.

As the benchmarks at the top of this post indicate, the speed improvements may be even higher by the time Firefox 3.1 is released at the end of 2008.

For now TraceMonkey is only available via the Firefox nightly builds (Safari’s SquirrelFish Engine is also only available via nightly builds), but when the first betas of Firefox 3.1 arrive, they’ll bring TraceMonkey — and potentially a much faster web — with them.

See Also:

Post Comment Comments Permalink Print
Reddit Digg

 
Subscribe now

Special Offer For Webmonkey Users

WIRED magazine:
The first word on how technology is changing our world.

Subscribe for just $10 a year