Javascript Performance Thread

Discussion about official Mozilla Firefox builds
Post Reply
User avatar
Omega X
Posts: 8225
Joined: October 18th, 2007, 2:38 pm
Location: A Parallel Dimension...

Re: Firefox 4.0 TM and JM Performance Thread

Post by Omega X »

Erunno wrote:
Omega X wrote:The "press" also got word of it.

Webmonkey as usual took the typical Chrome spin.


Not everyone prefers to put on the blinders when it comes to the competition. :wink:


Says, the chief of Chrome spin.
neo86
Posts: 124
Joined: July 21st, 2008, 2:53 pm

Re: Firefox 4.0 TM and JM Performance Thread

Post by neo86 »

Omega X wrote:
Erunno wrote:
Omega X wrote:The "press" also got word of it.

Webmonkey as usual took the typical Chrome spin.


Not everyone prefers to put on the blinders when it comes to the competition. :wink:


Says, the chief of Chrome spin.


Can you name a JS program where Firefox is faster than Chrome?
User avatar
sciguyryan
Folder@Home
Posts: 2181
Joined: November 10th, 2004, 1:33 pm
Location: Wales

Re: Firefox 4.0 TM and JM Performance Thread

Post by sciguyryan »

neo86 wrote:Can you name a JS program where Firefox is faster than Chrome?


TM performs a lot better on most benchmarks, the issue comes that tracing isn't compatible with all code types, for obvious reasons that has been discussed several times.
Cheers!

Ryan Jones
mat--
Posts: 669
Joined: May 20th, 2010, 8:12 am

Re: Firefox 4.0 TM and JM Performance Thread

Post by mat-- »

neo86 wrote:Can you name a JS program where Firefox is faster than Chrome?

http://hacks.mozilla.org/2010/08/fun-wi ... avascript/
Tom B.
Posts: 157
Joined: May 3rd, 2004, 3:53 am
Location: London, England

Re: Firefox 4.0 TM and JM Performance Thread

Post by Tom B. »

Here's a case where Google Chrome runs rings around the latest TraceMonkey build. Do the following in both browsers:

1) Go to http://chesstempo.com/game-database.html.
2) Click the "Games for Position" tab on the screen and, if necessary, scroll the list into view.
3) Press the Right Arrow key on the keyboard.
4) Wait for the list to finish loading.
5) Press Right Arrow again.

Now we're ready for the speed test:

6) Press Left Arrow twice (once at a time).

Google Chrome updates the list in a flash, while the latest TraceMonkey build is pretty slow and laggy.
User avatar
sciguyryan
Folder@Home
Posts: 2181
Joined: November 10th, 2004, 1:33 pm
Location: Wales

Re: Firefox 4.0 TM and JM Performance Thread

Post by sciguyryan »

That doesn't mean it is JS related, it could be graphics related and it seems to perform just fine here on a nightly.

Also, looking at the above case it will not benefit a whole lot from tracing, method JIT works better on most of the code.
Cheers!

Ryan Jones
Mattus
Posts: 95
Joined: March 21st, 2009, 10:46 am

Re: Firefox 4.0 TM and JM Performance Thread

Post by Mattus »

That site performs OK for me on the latest TM build. Chrome definitely updates the table quicker, but I wouldn't say Fx is laggy - still works pretty smoothly.
wellofsouls
Posts: 168
Joined: March 22nd, 2008, 10:12 pm

Re: Firefox 4.0 TM and JM Performance Thread

Post by wellofsouls »

RyanJ wrote:
neo86 wrote:Can you name a JS program where Firefox is faster than Chrome?


TM performs a lot better on most benchmarks, the issue comes that tracing isn't compatible with all code types, for obvious reasons that has been discussed several times.

I think you mean TM performs a lot better on most benchmarks that it can trace well :P
Unbiased (as much as possible at least :p ) Opera Fan
Opera snapshot / Konqueror trunk / Firefox Nightly / Chrome Canary / IE10
Windows 7 / Windows 8 / Arch Linux / Mac OS X
User avatar
bzbarsky
Posts: 478
Joined: November 5th, 2002, 1:36 pm

Re: Firefox 4.0 TM and JM Performance Thread

Post by bzbarsky »

neo86 wrote:Can you name a JS program where Firefox is faster than Chrome?

Sure. http://web.mit.edu/bzbarsky/www/mandelbrot-clean.html
neo86
Posts: 124
Joined: July 21st, 2008, 2:53 pm

Re: Firefox 4.0 TM and JM Performance Thread

Post by neo86 »

Hmm, I was hoping for something more exciting. :neutral:
phuzi0n
Posts: 517
Joined: June 23rd, 2010, 5:48 pm

Re: Firefox 4.0 TM and JM Performance Thread

Post by phuzi0n »

Tom B. wrote:Here's a case where Google Chrome runs rings around the latest TraceMonkey build. Do the following in both browsers:

1) Go to http://chesstempo.com/game-database.html.
2) Click the "Games for Position" tab on the screen and, if necessary, scroll the list into view.
3) Press the Right Arrow key on the keyboard.
4) Wait for the list to finish loading.
5) Press Right Arrow again.

Now we're ready for the speed test:

6) Press Left Arrow twice (once at a time).

Google Chrome updates the list in a flash, while the latest TraceMonkey build is pretty slow and laggy.

Both load in a fraction of a second without any discernible difference for me. They both used roughly equal CPU usage to do so as well.
User avatar
bzbarsky
Posts: 478
Joined: November 5th, 2002, 1:36 pm

Re: Firefox 4.0 TM and JM Performance Thread

Post by bzbarsky »

Tom B. wrote:Here's a case where Google Chrome runs rings around the latest TraceMonkey build.

That testcase spends about 10% of the total time running JS. Most of the time is spent painting, actually (60%+), with a bit more in layout and DOM code.

There's definitely work on making those faster too, but JM isn't going to help with them (and in fact, those codepaths are faster on m-c than on tm, since they're being actively worked on on m-c).
User avatar
bzbarsky
Posts: 478
Joined: November 5th, 2002, 1:36 pm

Re: Firefox 4.0 TM and JM Performance Thread

Post by bzbarsky »

neo86 wrote:Hmm, I was hoping for something more exciting. :neutral:

More exciting than which? And what excites you? ;)
Tom B.
Posts: 157
Joined: May 3rd, 2004, 3:53 am
Location: London, England

Re: Firefox 4.0 TM and JM Performance Thread

Post by Tom B. »

Hmm, I'm surprised by the replies. For me, Google Chrome is so much faster. GC renders the table in the blink of an eye, while TM is very slow, and I can feel the CPU lag. I tried M-C, bzbarsky, and that seemed even slower than TM for me. :/

In any case, I appreciate that people took the time to try this test case.

Thanks,
Tom
Cru_N_cher
Posts: 377
Joined: January 31st, 2010, 11:15 am

Re: Firefox 4.0 TM and JM Performance Thread

Post by Cru_N_cher »

here are some stuff firefox is crunching hard on

http://js1k.com/demo/653 (almost freezes the GUI, shows nicely how heavily firefox needs seperate GUI processing like GChrome has it)

also something awesome where firefox currently doesn't look that good

http://29a.ch/2010/6/2/realtime-raytrac ... javascript

another one

http://vis.stanford.edu/protovis/ex/force.html

and it goes on

http://acko.net/blog/js1k-demo-the-making-of

also interesting on behalf of real life javascript performances and benchmarking those efficiently
http://research.microsoft.com/apps/vide ... ?id=136780
Post Reply