Application Development - eWeek




Mozilla Speeds Up JavaScript with TraceMonkey





  Table of Contents:
  1. Mozilla Speeds Up JavaScript with TraceMonkey
  2. Speedy Performance
  3. Opening New Opportunities

Mozilla has revved up its SpiderMonkey JavaScript engine with a new just-in-time compiler. The TraceMonkey project boosts JavaScript performance by an order of magnitude. TraceMonkey is slated for release in Firefox 3.1 and is expected to also boost Canvas development.

Mozilla Speeds Up JavaScript with TraceMonkey - Opening New Opportunities
( Page 3 of 3 )

Eich also noted that this TraceMonkey news is "only a start. With tracing, performance will keep going up. We have easy small linear speedup tasks remaining (better register allocation, spill reduction around built-in calls). We will trace string and regular expression code. ... We will even trace into DOM methods. The tracing JIT approach scales as you move more code into JS, or otherwise into view of the tracing machinery."

So what does this all mean, you might ask? Well, Resig asked the same question and answered it:

"It means that JavaScript is no longer confined by the previously challenging resource of processing power. With this improvement it's leapfrogged any sort of traditional and has gone head-to-head with computationally powerful languages like C."

Resig also said he expects to see "more, massive projects being written in JavaScript," including projects that expect the performance gains that we're starting to see, such as "applications that are number-heavy [like image manipulation] or object-heavy [like relational object structures]."

For his part, Resig said he is especially interested in how TraceMonkey will impact development using Canvas. Canvas is an HTML element that can be used to draw graphics using scripting, typically with JavaScript.

"The primary thing holding back most extensive Canvas development hasn't been rendering—but the processor limitations of the language: performing the challenging mathematical operations related to vectors, matrices or collision detection," Resig said. "I expect this area to absolutely explode after the release of Firefox 3.1 as we start to see this work take hold."

Eich said he expects other browsers to follow suit and begin to use JIT compilation for JavaScript.

"I believe that other browsers will follow our lead and take JavaScript performance through current interpreter speed barriers, using just-in-time native code compilation," Eich said. "Beyond what TraceMonkey means for Firefox and other Mozilla projects, it heralds the JavaScript Lightspeed future we've all been anticipating. We are moving the goal posts and changing the game, for the benefit of all Web developers." 

 




 
 
>>> More Application Development Articles          >>> More By Darryl K. Taft
 

FEATURED SPONSOR MESSAGE

Microsoft Sponsored Resource Center

Increase Your Microsoft Office 365 Knowledge! Dig inside this suite of cloud-based collaboration tools.

Watch the video >>

Brought to you by





Advertisement
eWEEK Quick LInks