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

Commenting is disabled on this article.

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.

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 :

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.

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

i still use firefox but i did u crome recently and didnt realise how slow firefox got. i thought it was fast and have use dit for about 2 years now but crome was realy fast. still probebly stick with firefox though!

Firefox, if it weren't for the addons, is falling behind fast... open source development which I support, simply doesn't move as fast as I thought it would.

Typing this on Firefox.

Hercules said,
Firefox, if it weren't for the addons, is falling behind fast... open source development which I support, simply doesn't move as fast as I thought it would.

Typing this on Firefox.

I'm in the exact same boat. But the future is looking bright. :)

Hercules said,
Firefox, if it weren't for the addons, is falling behind fast... open source development which I support, simply doesn't move as fast as I thought it would.
Compared to what, though? Chrome? Chrome is mostly open source.

Hercules said,
Firefox, if it weren't for the addons, is falling behind fast... open source development which I support, simply doesn't move as fast as I thought it would.

Typing this on Firefox.


Agreed.

Hercules said,
Firefox, if it weren't for the addons, is falling behind fast... open source development which I support, simply doesn't move as fast as I thought it would.

Typing this on Firefox.

You're generalising a bit too much there. Yeah Firefox development has slowed to a crawl recently, but on the other hand, Chromium, the source code upon which Chrome is based, is also open-source and development of Chromium moves at an astonishing rate. So too does WebKit development, which is again, an open source project.

By the looks of the article though, Firefox development speed is certainly improving, which is nothing if not a good thing. :-)

Hercules said,
Firefox, if it weren't for the addons, is falling behind fast...

Add-ons are the only thing keeping me on Firefox as well. As soon as a good Web Developer add-on alternative becomes available for Chrome, I'll make the switch.

jordan. said,

Add-ons are the only thing keeping me on Firefox as well. As soon as a good Web Developer add-on alternative becomes available for Chrome, I'll make the switch.


I love Chrome. It's super fast and easy to use but the thing that bothers me about it is that I run into sites that Chrome won't load. I just get a blank page. If I copy and paste the same URL to FF or IE then it loads. I know it's the fault of the web developer that put the site together but I wish Google could figure out a way to interpret whatever flawed code is behind that page. Then I wouldn't find myself switching between browsers all the time.

Majesticmerc said,

By the looks of the article though, Firefox development speed is certainly improving, which is nothing if not a good thing. :-)

Yeah, and it really looks like Mozilla is putting a lot of weight behind improving the browser in the next versions... Reworking the release schedules? Great. New UI? Great. New JS engine? Great. New Add ons system? Great. Improved stability? Great. They're really doing a lot in a relatively short period considering what they're attempting to accomplish...

Interesting, I think that these speed wars are generally pushing all browsers in a good direction.
Browser Wars 2.0 is a good thing.

Argote said,
Interesting, I think that these speed wars are generally pushing all browsers in a good direction.
Browser Wars 2.0 is a good thing.

Just hopefully this one won't end with one major browser taking all the market share, then falling severely behind in the following years.

Argote said,
Interesting, I think that these speed wars are generally pushing all browsers in a good direction.
Browser Wars 2.0 is a good thing.
Of all moments, I don't understand why you decided to post this comment now?

This is a *loss* of competition, but yes, in the short term, it could mean some nice improvements for Firefox. As for the long term, this is less competition/war as for Javascript engines. *shrug*

Edited by Northgrove, Mar 9 2010, 6:18pm :

Northgrove said,
Of all moments, I don't understand why you decided to post this comment now?

This is a *loss* of competition, but yes, in the short term, it could mean some nice improvements for Firefox. As for the long term, this is less competition/war as for Javascript engines. *shrug*


I don't necessarily agree. The Firefox devs seem to think that WebKit's JS engine is the best, and more browsers adopting it will mean more devs pushing it forward.

Hendrick said,
Just hopefully this one won't end with one major browser taking all the market share, then falling severely behind in the following years.
Highly unlikely history will repeat itself in the near future. As an open-source browser, I think it is more important to support Firefox, because the rest (of the major players) are ultimately in it for profit/self-gain.

C?bra
Highly unlikely history will repeat itself in the near future. As an open-source browser, I think it is more important to support Firefox, because the rest (of the major players) are ultimately in it for profit/self-gain.

And Mozilla isn't? Last I checked, Mozilla was a sizable, for-profit company with million-dollar revenue.

Northgrove said,
Of all moments, I don't understand why you decided to post this comment now?

This is a *loss* of competition, but yes, in the short term, it could mean some nice improvements for Firefox. As for the long term, this is less competition/war as for Javascript engines. *shrug*

Sounds like a major fork rather than wholesale adoption. Maybe the code will be contributed back directly, but it's all open source and this is why open source is a Good Thing

agreenbhm said,

I don't necessarily agree. The Firefox devs seem to think that WebKit's JS engine is the best, and more browsers adopting it will mean more devs pushing it forward.

They aren't using the actual JS engine, they're using the low level assembler that's part of it.

So there's still going to be SpiderMonkey, it'll just use Nitro to generate native code.

cyberdrone2000 said,
And Mozilla isn't? Last I checked, Mozilla was a sizable, for-profit company with million-dollar revenue.
Yes, they are. But 90% of their revenue comes from Google, which is around $65 million. Now that Google has their own browser, one would question why they're not touting it more aggressively. After all, I doubt wages of the Chrome team combined + the whole Chrome project costs more than $10m year (could see that as 100 employees x $100,000/year salary each).