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

    • Linux 7.1 arrives with an NTFS overhaul and major hardware performance boosts by Paul Hill The founder of the Linux kernel has just announced the availability of Linux 7.1. This is a stable version of the kernel that will now be tested by various Linux distributions before it is shipped to users through update managers. Some users, like those on Debian, for example, might not get it for a long time, if at all, while Fedora users can expect it in the near future. With Linux 7.1 out on time, the merge window for Linux 7.2 is now open, giving contributors the opportunity to send in major new features that have been waiting for the last two months. Torvalds warned that he is currently travelling and will be in another timezone, so timing for the merge window may be irregular due to timezone differences and limited internet access. Torvalds said that he has already fetched early pull requests to allow him to do some offline work, but the travel could still cause disruption. Right now, he is not planning to extend the release, but did consider it. He said he might later regret not extending, though. In terms of this last week of development for Linux 7.1, Torvalds said there were no major or alarming changes. This week consisted mostly of smaller driver updates to GPU, networking, and sound, networking fixes, trace tooling fixes, and misc minor fixes. The shortlog this week lists fixes for driver bugs, memory leaks, I/O and USB fixes, networking and RDMA fixes, DRM/graphics fixes, and tooling and verification improvements. Specific fixes include USB series heap-overflow and buffer overflow fixes, and multiple use-after-free, memory-leak, and refcount corrections across subsystems such as i2c, zram, gpio, and net. There are fixes for graphics drivers, including amdgpu, i915, and virtio, as well as hypervisor and virtualization tweaks affecting mshv, vmbus, and hyperv. According to Phoronix, anyone running Linux 7.1 should look out for the new NTFS driver, Intel FRED for improved performance on Panther Lake and future CPUs, faster graphics with Intel Arc Battlemage, and improvements for older AMD Radeon GPUs. If you are running Linux on your computer and everything is fine, then you don’t need to worry about updating to Linux 7.1 as a priority; just wait for it to be pushed to you. If you have tried Linux on hardware but it didn’t work properly, trying again with a distro that uses Linux 7.1 could cause Linux to work on your machine, thanks to the new hardware support.
    • you can also do this with this tool: PowerSettingsExplorer made by mbk1969 at 3dguru forum.. I found it by accident researching on modern standby and annoying quirks of it in 2022
    • AB Download Manager 1.9.1 by Razvan Serea AB Download Manager is an open-source, feature-rich download manager designed to accelerate downloads, organize files efficiently, and provide seamless control over downloads. With support for multiple connections, resume capability, and an intuitive interface, it enhances the downloading experience for users seeking speed and reliability. The software integrates with various browsers, enabling quick link grabbing and batch downloading. It supports HTTP, HTTPS, and FTP protocols, ensuring broad compatibility with different file sources. Users can schedule downloads, set speed limits, and categorize files automatically for better organization. AB Download Manager is lightweight yet powerful, making it a great alternative to proprietary download managers. Its open-source nature allows developers to contribute, customize, and improve the software as needed. Whether you're downloading large files, managing multiple downloads at once, or seeking an ad-free experience, this tool offers a practical and efficient solution. Key features of AB Download Manager: Multi-Connection Support – Accelerates downloads by splitting files into multiple segments. Resume Capability – Allows paused or interrupted downloads to be resumed without starting over. Batch Downloading – Supports downloading multiple files at once for improved efficiency. Browser Integration – Captures download links directly from browsers for seamless operation. HTTP, HTTPS, and FTP Support – Ensures compatibility with a wide range of file sources. Download Scheduling – Enables users to automate downloads at specific times. Speed Limiting – Lets users control bandwidth usage for optimized performance. File Categorization – Automatically organizes downloaded files into designated folders. User-Friendly Interface – Simple and intuitive design for easy navigation. Cross-Platform Compatibility – Works on multiple operating systems. Ad-Free Experience – No intrusive ads or tracking for a clean user experience. AB Download Manager 1.9.1 changelog: Added An option to customize notification sounds (#1259) Fixed Ongoing notification was laggy on Samsung One UI devices (#1269) Improved Updated Translations Minor UI/UX improvements Download: AB Download Manager 1.9.1 | Portable | ~80.0 MB (Open Source) Download: ARM64 | Portable ARM64 | Android Links: AB Download Manager Website | Github Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • watching him because of the Mr Klinton cat
    • yup dude, ADS on this website are terrible
  • Recent Achievements

    • 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
    • One Month Later
      agatameier earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      506
    2. 2
      +Edouard
      196
    3. 3
      PsYcHoKiLLa
      140
    4. 4
      ATLien_0
      90
    5. 5
      Steven P.
      81
  • Tell a friend

    Love Neowin? Tell a friend!