Firefox's upcoming JavaScript engine uses Webkit code

It's no secret that Firefox, which was once the fastest browser out there, has begun falling behind in the JavaScript speed race. Browsers, like Google Chrome and Opera, now make Firefox seem sluggish by comparison. This doesn't mean that Firefox is slow; but these days, a lot of attention is paid to milliseconds of load time, measured by JavaScript performance. As a general rule, the faster the JavaScript engine, the faster the browser.

Ars Technica sheds some light on the current situation and what Mozilla plans to do to regain its crown. Dubbed JägerMonkey, the upcoming JavaScript engine for Firefox is in the oven, and looking hot. As part of the engine, Mozilla is pulling code from Apple's open-source Webkit. This, as well as Firefox's current JavaScript engine, TraceMonkey, will be fused together into a whole new animal. Using Apple's JSCore engine and its just-in-time (JIT) compilation, JägerMonkey could prove to be a serious competitor for the speed crown.

Here's how Mozilla developer, David Mandelin, explains JägerMonkey:

"The reason we're [building JägerMonkey] is that TraceMonkey is very fast for code that traces well, but for code that doesn't trace, we're stuck with the interpreter, which is not fast. The JägerMonkey method JIT will provide a much better performance baseline, and tracing will continue to speed us up on code where it applies."

Mozilla's trace optimization has proven to significantly boost JavaScript speeds when compared to previous versions of their own JavaScript engines. Taking that speed boost and fusing it with JIT compilation will give Firefox the best of both worlds, and hopes to deliver the fastest web experience available. JägerMonkey is still in the earlier stages of development, and no ETA has been mentioned.

Report a problem with article
Previous Story

Google adds POP refresh button to Gmail Labs

Next Story

Energizer needs to stick to batteries, software opens your PC to hackers

45 Comments

View more comments

Personally, I'd be ok with just LESS javascript to start with. I'd prefer we didn't rely so much on the heavy use of java script to make our web more 'exciting' or 'visually immersive' and spend more time focusing on content.

Tempus said,
Personally, I'd be ok with just LESS javascript to start with. I'd prefer we didn't rely so much on the heavy use of java script to make our web more 'exciting' or 'visually immersive' and spend more time focusing on content.
-1

Tempus said,
Personally, I'd be ok with just LESS javascript to start with. I'd prefer we didn't rely so much on the heavy use of java script to make our web more 'exciting' or 'visually immersive' and spend more time focusing on content.

+1
And add to this less flash too.
I run FF with NoScript.

Edited by ilev, Mar 9 2010, 5:05pm :

I'm going to have to disagree. Many of the places where javascript is used heavily are for things that improve the user experience. Like when I clicked the reply button to your post just now and got this text box without having to refresh the entire page.

Tempus said,
Personally, I'd be ok with just LESS javascript to start with. I'd prefer we didn't rely so much on the heavy use of java script to make our web more 'exciting' or 'visually immersive' and spend more time focusing on content.

Bye, bye Ajax then. The whole in-line commenting system here at Neowin wouldn't work without it, without a page refresh. No thanks.

Of course, people are welcome to their opinions, but JavaScript is far too useful to get rid of, and it's a standard that every browser supports.

pickypg said,

Bye, bye Ajax then. The whole in-line commenting system here at Neowin wouldn't work without it, without a page refresh. No thanks.

Of course, people are welcome to their opinions, but JavaScript is far too useful to get rid of, and it's a standard that every browser supports.

+1
Unlike several years ago, today Javascript is very important. Such as Ajax, jQuery(!)

jordan. said,
I'm going to have to disagree. Many of the places where javascript is used heavily are for things that improve the user experience. Like when I clicked the reply button to your post just now and got this text box without having to refresh the entire page.

+1 to your response.

Tempus said,
Personally, I'd be ok with just LESS javascript to start with. I'd prefer we didn't rely so much on the heavy use of java script to make our web more 'exciting' or 'visually immersive' and spend more time focusing on content.

+1000

Jscript is such a crutch these days.

mounty said,

+1000

Jscript is such a crutch these days.


Yeah I hate how I can post this without having to wait for the entire page to load again, I miss constant page refreshes and bandwidth waste.

hotdog963al said,

Yeah I hate how I can post this without having to wait for the entire page to load again, I miss constant page refreshes and bandwidth waste.

Regardless a website should still be fully functional without jscript.

mounty said,
Regardless a website should still be fully functional without jscript.
Why? Not everything can be done with JavaScript (Jscript is not quite the same thing btw).

Kirkburn said,
Why? Not everything can be done with JavaScript (Jscript is not quite the same thing btw).

But would you say the same for an all Flash interface?

A website should always 'degrade gracefully' for accessibility reasons, such as people using screen readers or a mobile device (this is true for both client side scripting and style sheets). This isn't a minor consideration either, there have been lawsuits in recent years against large websites with poor accessibility options.

Another consideration is some users will have 3rd party domains blocked, so if a website links a script from a remote server then the user may find the site unusable if no fallback option is provided.

See here if you want some more info on the arguments for and against:
http://stackoverflow.com/questions/337570/is-it-worth-it-to-code-different-functionality-for-users-with-javascript-disabled

Majesticmerc said,
Wish Granted! Refer to top of page...

FASTER.

Seriously, if Firefox could push to be close to Chrome, I'd cream my pants and scream my head off like that N64 kid.

Udedenkz said,
This + D2D Acceleration.

DirectWrite & Direct2D are now in the Firefox nightlies...

http://weblogs.mozillazine.org/asa/archives/2010/02/direct2d_landed_in_f.html

Edited by thommcg, Mar 9 2010, 8:49pm :

i think as long as everyone sticks to the standards and continues towards 100% compliance everything will get peachier. speed wars at this point are mostly secondary. i wanna see what IE9 has to offer at mix10, they better do something about their horrible compliance before speed.

Commenting is disabled on this article.