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

    • I totally disagree. Very little good comes out of governments all around the world manipulating everything they can and usually the people are not the benefactors. What you say about being restricted and expensive sounds almost like the arguments against firearms and why banning them will protect people as if making something illegal somehow will prevent the criminals from having and using them. AI being far less mainstream could simply mean the average person will not benefit, but "big brother" and the corporations will benefit, which is almost for sure NOT a good thing.
    • I do apologize to the author Mr. Sen for my rude comment, questioning his knowledge of the subject. It is I whom lacked knowledge of the subject. Sorry!
    • Hello All Have a MSI Pro B650 VC Wifi Rev 1.0 motherboard Ryzen 7 7700X Radeon 7800XT OC 16GB 32GB Teamgroup DDR 5 5600mhz Samsung 990 Pro 1TB Boot NVMe Samsung 990 Pro 2TB Game NVMe Lian Li Lancool Black ARGB 216 Case Seasonic Focus GX 750 Watt Power supply   Wondering today what is best spot to plug in the following items on system for performance and not bottle neck anything if i can help it Creative Pebble Pro USB C or A Speakers, ((Powered by External USB C to C PD Adapter)  Logitech G513 USB Gaming Keyboard Logitech G502X Wired Gaming Mouse Cyberpower UPS USB Cable for UPS Power Management/System shutdown External drives connected occasionally are as follows---WD My Book 8TB (primary backup drive)   Seagate 8TB in External USB 3.0 Enclosure,  Seagate Portable 1TB USB 3.0 drive,   WD My Passport (Blue) 2TB, and WD My Passport (Red) 2TB,    WD Elements 500GB USB 2.0 External (Oldest one, Christmas 2003)       **Do have a 7 Port Powered  USB Hub as well, but when i use that--that leaves only the USB Flash spot for something to directly connect to system if needed.    Rear USB C 2x2 unused right now as moved the Creative speakers off it to USB A port next to it, with a USB C to A Cable, as figured speakers didn't near audio from USB C port and tie up the high speed port**   Front Ports trying to limit use of, so i don't have Front I/O port go bad again, already had it replaced once by Lian Li support all the way from Taiwan over night ((Do get extra nervous at times on things,  so i might just be extra nervous for nothing lol))
    • "connect with audiences" is the most obvious corporate speak you can think of. I only bought Need for Speed from EA because it was the only racing game with cops in existence and I dig that. Now that they killed off NFS franchise, I have nothing to spend money on. EA is officially dead for me, just like Ubisoft which I've been boycotting for some 20 years now...
  • Recent Achievements

    • Week One Done
      Jeroen Wilms earned a badge
      Week One Done
    • Week One Done
      rolfus earned a badge
      Week One Done
    • One Month Later
      Leroy Jethro Gibbs earned a badge
      One Month Later
    • Conversation Starter
      flexorcist earned a badge
      Conversation Starter
    • One Month Later
      AndreaB earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      494
    2. 2
      +Edouard
      203
    3. 3
      PsYcHoKiLLa
      127
    4. 4
      Steven P.
      82
    5. 5
      ATLien_0
      79
  • Tell a friend

    Love Neowin? Tell a friend!