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

    • Just when I thought EA couldn't go lower. They surpassed my expectations
    • The GEEKOM A8 mini PC is 20% off (lower than Prime Day pricing) plus Huge Storewide Sale by Steven Parker GEEKOM is back with a deal on a variant of its A8 Mini PC powered by AMD's Ryzen 7 8945HS, which came out in 2024 with a TDP of just 45W, with a base clock of 3.8 GHz and a Turbo Boost of 4.9 GHz; although we never reviewed this variant, we did check out the Ryzen 9 version. As a reminder of what you get, below are the specifications for this Mini PC. GEEKOM A8 Dimensions 112.4 mm x 112.4 mm x 37 mm Weight 450g CPU Ryzen 7 8745HS (8 cores, 16 threads, 16MB L3 cache, 3.8 - 4.9 GHz, TDP: 45 W) cTDP: 35-54W (Default 45W) Graphics AMD Radeon™ 780M Graphics 12 RDNA 3 Graphics Cores 2700MHz 768 shading units / stream processors (12 CUs), 48 texture mapping units, and 32 ROPs NPU XDNA architecture (Up to 16 NPU TOPS) Memory 16GB Dual-channel Crucial DDR5-5600MT/s SODIMM (up to 64GB) Storage 1TB NVMe M.2 (PCIe Gen 4.0 x4) Operating System Windows 11 Pro Bluetooth Bluetooth v5.2 Wireless LAN Wi-Fi 6E Kensington Lock No SD Card reader Yes (left side) Adapter 120W, 6.32A, 19V Power Adapter Front I/O Ports 2 x USB 3.2 Gen 2 Type-A 1 x 3.5mm front stereo headset jack Rear I/O Ports 1 x USB 3.2 Gen 2 Type-A 1 x USB 4 Gen 3 Type-C with Power delivery up to 15W (5V 3A) 1 x USB 3.2 Gen 2 Type-C 1 x USB 2.0 Type-A 2 x HDMI 2.0b 1 x 2.5G RJ45 LAN 1 x DC-in Deal Price $519 (buying links below) GEEKOM has two configurations of the A8, with the only difference being the slightly less-powerful Ryzen 7 CPU with half the storage (1TB) and DDR5 memory (16GB). This knocks $350 off the price compared to the $999 Ryzen 9 configuration. In both instances, a Windows 11 Pro license is also pre-loaded. As I said previously, this appears to be an update on the A7 with the only difference being the newer CPU. The packaging has changed quite a bit from the A7. Instead of dark colors, now the box is completely white, and the foam cushion has been replaced by a cardboard mould that the A8 sits in, above a small envelope that contains a thank you card and booklet that has guidance on all of the controls, how to access the A8 to swap out the SSD or memory, and safety information in several European languages. Upon removing the cardboard mould, you can find another cardboard compartment that contains the power lead, HDMI cable, VESA plate, and a bag of screws. What’s In The Box 1 x A8 Mini PC 1 x Power Adapter 1 x HDMI Cable 1 x VESA plate and bag of screws 1 x Envelope with booklet and Thank you card Unlike the A7, the VESA mount option is back with the A8. In short, you have everything you need to get started. All products sold by GEEKOM receive a 3-year free Warranty from the date you receive the product. If needed, you can RMA or return locally relative to your region (the U.S. has a U.S. warehouse, mainland E.U. has a German warehouse). GEEKOM A8 at GEEKOM U.S. for $519 was $649 (20% off) GEEKOM A8 at GEEKOM U.K. for £503 was £629 (20% off) GEEKOM A8 at GEEKOM CA for $735.20 was $919 (20% off) Use coupon code NWGKA820 when checking out. This flash deal expires on July 2. Next up is the highest savings on the A7 Max series of Mini PC in the Spring Sale. The GEEKOM [2026 Edition] A7 MAX with AMD Ryzen 9 7940HS, 16GB DDR5, and 1TB SSD. Operating System: Windows 11 Pro CPU Model: Ryzen 9 7940HS CPU Speed: 5.2 GHz Cache Size: 24 MB Graphics Card Description: Integrated Graphics Coprocessor: AMD Radeon 780M Memory Storage Capacity: 16GB DDR5 SSD: 1 TB We reviewed this Mini PC back in January, and praised it for its modern internals like a dedicated NPU and DDR5 memory; as such, it is more than capable of keeping up with today's offerings of Mini PC on the market. GEEKOM A7 Max at GEEKOM U.S. for $587 (was $699) 16% off GEEKOM A7 Max at GEEKOM U.K. for £551 was £689 (20% off) Use coupon code NWGKA7MAX when checking out. This flash deal expires on July 2. Huge Summer Sale If the above deals don't tickle your fancy, from today, there are deep discounts on a range of other GEEKOM products. From June 15 to June 30, the GEEKOM Official Store will be running its Summer Sale, with discounts starting from 15% off across the entire lineup, up to 50%! This is their biggest promotion of the year so far, offering pricing that is even lower than select Prime Day deals. You can check out the discounts at the dedicated Summer Sale landing pages below. GEEKOM U.S. Summer Sale GEEKOM U.K. Summer Sale What's more, all products from GEEKOM receive a 3-year free Warranty from the date you receive the product. If needed, you can RMA or return locally relative to your region (the U.S. has a U.S. warehouse, mainland E.U. has a German warehouse, the U.K. has a U.K. warehouse, Australia has an AU warehouse). While the Summer Sale ends on June 30, deals on the A8 and A7 Max will remain active until July 2.
  • 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
      513
    2. 2
      +Edouard
      205
    3. 3
      PsYcHoKiLLa
      136
    4. 4
      ATLien_0
      88
    5. 5
      Steven P.
      85
  • Tell a friend

    Love Neowin? Tell a friend!