New Firefox JavaScript engine is faster than Chrome's V8


Recommended Posts

One of the most impressive features in Google's open source Chrome web browser is V8, a high-performance JavaScript virtual machine that was developed by a team of specialists in Denmark. Although Chrome's performance beats the current stable version of Firefox, benchmarks show that Mozilla's next-generation JavaScript engine actually outperforms V8.

Mozilla is using tracing optimization techniques and Adobe's open source nanojit to increase the execution speed of SpiderMonkey, the JavaScript runtime engine in the Firefox web browser. The new engine, which is called TraceMonkey, delivers unprecedented JavaScript performance. The new optimizations have already landed in the latest Firefox nightly builds (but still have to be manually enabled) and will likely be included in Firefox 3.1.

JavaScript creator and Mozilla CTO Brendan Eich ran the SunSpider JavaScript benchmarks against Chrome and the latest TraceMonkey-enabled Firefox build, which includes some recent improvements. The benchmarks show that TraceMonkey is clearly faster than Google's V8. Mozilla believes that the optimization technique used in TraceMonkey has the potential to unlock even more performance improvements...

http://arstechnica.com/journals/linux.ars/...than-chromes-v8

Edited by ViperAFK

It is, indeed, faster. My results:

  • Firefox 09/01/2008 Gran Paradiso Nightly: 5100ms
  • Firefox 09/02/2008 Minefield Nightly w/o Tracemonkey: 4500ms
  • Firefox 09/03/2008 Minefield Nightly w/ Tracemonkey: 2100ms
  • Google Chrome: 2800ms

I'm very impressed.

Edited by bangbang023
cool, what's the release date for 3.1 ?

I want to know too!

The java race is on... maybe? Google won't like v8 being trumped- will they improve it? They have enough codemonkeys, I'll bet.

So I wonder, will Microsoft enter this race with IE8?

ATM IE8 looks like a 5000lb walrus. :p (Comparing to FF3.1 and Chrome).

The Sunspider test don't mean anything at all.

The javascript is converted to machine code and executed several times in a loop.

The test will ignore the highest time and the lowest times. The highest time is the usually the time required to compile javascript to native code.

Real word code on website don't work that way. Most of the code is not executed several times in a loop. Most of the code is just executed once.

For cases where the code is executed just once the engines that do so well on Sun spider are not going to be as performant.

The Sunspider test don't mean anything at all.

The javascript is converted to machine code and executed several times in a loop.

The test will ignore the highest time and the lowest times. The highest time is the usually the time required to compile javascript to native code.

Real word code on website don't work that way. Most of the code is not executed several times in a loop. Most of the code is just executed once.

For cases where the code is executed just once the engines that do so well on Sun spider are not going to be as performant.

So, what other tests would you suggest?

Damn, where is Opera stack up in there?

Tp answer your question, I installed the latest Opera update. Compare to my previously posted results:

  • Firefox 09/01/2008 Gran Paradiso Nightly: 5100ms
  • Firefox 09/02/2008 Minefield Nightly w/o Tracemonkey: 4500ms
  • Firefox 09/03/2008 Minefield Nightly w/ Tracemonkey: 2100ms
  • Google Chrome: 2800ms
  • Opera 9.52: 7300ms

I'm running an Athlon64 3700+ at stock speed.

So, what other tests would you suggest?

Correct me if I am wrong, but as far as I know the normal JavaScript still has to be converted to machine code whereas with V8 this step has already been done and therefore much faster, even on slower PC's! Also as far as I know ALL browsers except for Chrome run in a single process whereas Chrome has a process for each tab. So if for example, one tab on a normal browser freezes the browser will fall over as opposed to Chrome being able to handle one or two tabs freezing and not have the browser crash and burn! Anyone who knows a little more about this please feel free to elaborate!

Correct me if I am wrong, but as far as I know the normal JavaScript still has to be converted to machine code whereas with V8 this step has already been done and therefore much faster, even on slower PC's! Also as far as I know ALL browsers except for Chrome run in a single process whereas Chrome has a process for each tab. So if for example, one tab on a normal browser freezes the browser will fall over as opposed to Chrome being able to handle one or two tabs freezing and not have the browser crash and burn! Anyone who knows a little more about this please feel free to elaborate!

The process thing is utter crap, try putting this into the address bar: qwer%:

see what happens ;)

Mozilla's own dromaeo, and Full Render of progressive ray tracer?

also for me somehow V8 is a lot faster than TraceMonkey in Sunspider.

Dromaeo does paint a different picture for me:

Chrome: 568ms

Fx w/ TraceMonkey: 1531ms

Also as far as I know ALL browsers except for Chrome run in a single process whereas Chrome has a process for each tab. So if for example, one tab on a normal browser freezes the browser will fall over as opposed to Chrome being able to handle one or two tabs freezing and not have the browser crash and burn!

IE8 has this as well. It's a pretty recent thing, but quite effective as long as the parent process doesn't crash. One interesting application is that you can use the Windows Task Manager to change process priority on the individual tabs, and making a page that taking an excessive amount of CPU low priority can be quite helpful for those of use still using single-core processors. (Automating that would be icing on the cake :))

Depending on what benchmarks you use, you'll end up testing other parts than you mean to. A pure JS benchmark is good, one that tests the DOM will be inaccurate (Most of your time will be spent in native code within the engine), and that relies on rendering speed of the engine will be dependant on drivers, memory speed, etc.

Correct me if I am wrong, but as far as I know the normal JavaScript still has to be converted to machine code whereas with V8 this step has already been done and therefore much faster, even on slower PC's!

...

V8 isn't magic, it still has to compile the JS to native code, just like TraceMonkey and SquirrelFish do.

Depending on what benchmarks you use, you'll end up testing other parts than you mean to. A pure JS benchmark is good, one that tests the DOM will be inaccurate (Most of your time will be spent in native code within the engine), and that relies on rendering speed of the engine will be dependant on drivers, memory speed, etc.

well, still, Chrome is twice as fast as the latest WebKit nightly with SquirrelFish in the ray tracer test, that's really something. It shows despite being built upon an old webkit, it has quite some speed improvements on both javascript and DOM.

V8 isn't magic, it still has to compile the JS to native code, just like TraceMonkey and SquirrelFish do.

AFAIK, SquirrelFish doesn't compile it to native code, but just byte code only?

It's strange with the raytracing test, since it's mainly a DOM test (the JS code is small and light), new WebKit should beat old WebKit, unless Apple broke something (or fixed it, but the fixed method is slower)

And yeah, SquirrelFish is actually a bytecode interpreter, so it doesn't go down to the native code level.

Edit: Ages ago I messed around with that raytracer and made it use <canvas> instead, http://alex.thefrapp.com/files/progressive_raytracer.html in FX3 it finishes in around 3 seconds (filling a 1px rectangle on a pixel buffer is much faster than creating a 1px <div>)

Dromaeo does paint a different picture for me:

Chrome: 568ms

Fx w/ TraceMonkey: 1531ms

This is mainly because the parts of tracemonkey that would apply in that particular benchmark haven't landed yet. Same goes for the few SunSpider tests where V8 dominates.

This graph does show V8 cleaning our clock on a couple of recursion-heavy tests. We have a plan, to trace recursion (not just tail recursion). We simply haven't had enough hours in the day to get to it, but it's "next".

http://weblogs.mozillazine.org/roadmap/arc...key_update.html

Anyone else remember when Opera was the hands down fastest for rendering anything?

Anyway, good to hear. Guess it's time for me to move back to the nightlies :D

It still feels like it's the fastest browser for me. I'm on a few OC3 connections :cool:

It is, indeed, faster. My results:

  • Firefox 09/01/2008 Gran Paradiso Nightly: 5100ms
  • Firefox 09/02/2008 Minefield Nightly w/o Tracemonkey: 4500ms
  • Firefox 09/03/2008 Minefield Nightly w/ Tracemonkey: 2100ms
  • Google Chrome: 2800ms

I'm very impressed.

hey bangbang, can you link where I can download this version of firefox for mac (if available)

thank you

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Marshall Major V Bluetooth headphones are now up to 47% off on Amazon by Ivan Jenic The Marshall Major V in Midnight Blue is currently $89.99 on Amazon, down from $169.99. That's 47% off and $80 saved on a pair of wireless on-ear headphones from one of the most recognizable names in audio. The Major V is Marshall's take on a long-lasting everyday headphone. The headphones deliver 100+ hours of wireless playtime, which puts them in a completely different category from most Bluetooth headphones that hover around 30-40 hours. You’re charging this thing once a week at most, and with wireless charging supported, you don’t have to worry about additional cables. Marshall promises its signature sound profile, with strong bass, smooth mids, and clear highs. There’s a customizable M-button, which you can set to quickly access Spotify Tap, your EQ settings, or a voice assistant. The design is foldable and lightweight at 186 grams, so it’s easy to pack for travel. And finally, the faux leather finish gives the Major V a sleek, premium look. At $89.99, the Major V Midnight Blue is a genuinely strong buy for anyone who wants a reliable daily headphone without paying premium prices. It’s also worth mentioning that the Cream and Brown variants are also discounted to $89.99, though from a lower original price of $99.99. Marshall Major V Midnight Blue - $89.99 | 47% off on Amazon This Amazon deal is US-specific and not available in other regions unless specified. This is a first-party seller link (at the time of article publishing); ensure that you also purchase from a first-party seller link only. If you don't like it or want to look at more options, check out the previous deals that we have covered, OR you can also visit Amazon US deals page. Get Prime (SNAP), Prime Video, Audible Plus or Kindle / Music Unlimited. Free for 30 days. As an Amazon Associate, we earn from qualifying purchases.
    • +1 on XVI. I still use it. 
    • Age 16, old enough to get a full-time job, your own bank account, a passport, get married, even join the military and go to war. But talking to your friends on the internet? Oh hell no!
    • I remember when all games had demos; it was a normal thing, not a limited time promotion.
  • Recent Achievements

    • Reacting Well
      Almohandis earned a badge
      Reacting Well
    • First Post
      Cosminus earned a badge
      First Post
    • One Year In
      ThatGuyOnline earned a badge
      One Year In
    • Week One Done
      Jeroen Wilms earned a badge
      Week One Done
    • Week One Done
      rolfus earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      483
    2. 2
      +Edouard
      185
    3. 3
      PsYcHoKiLLa
      122
    4. 4
      Steven P.
      84
    5. 5
      neufuse
      73
  • Tell a friend

    Love Neowin? Tell a friend!