Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
JavaScript speedups in Firefox 3.6 (hacks.mozilla.org)
68 points by indy on Jan 24, 2010 | hide | past | favorite | 30 comments


I'll be interested in Firefox again when they get process-per-page going. After becoming so spoiled by this in Chrome, I just can't go back...yet...


Exactly the same thing going here.

It's funny how such a seemingly meaningless architectural decision can turn into such a disruptive feature.


Mozilla really needs to step it up. TraceMonkey is still way behind V8. They need to do something to get competitive with Chrome in terms of performance, or there's no possibility of ever switching back for me. Chrome is always 2-3x faster.


"Always"? Check out http://portfoli.no/, Firefox 3.6 vs Chrome: http://www.youtube.com/watch?v=lQ2PDbffKuQ


"Always" in my experience, anecdotally. I am sure there are some crafted benchmarks that favor Mozilla, but they're not really fair; in every real-life deployment I've seen personally, Chrome has crushed Firefox. There may be some edge cases where Firefox performs better, but Chrome is by far the faster browser for real-life browsing.


Maybe Firefox is superior on OS X. Chrome definitely runs it faster on my XP box.


I second that.

I've been using Chrome the past couple of weeks on my Mac. But the last few days, that stupid font bug has been coming up again and I've been forced to switch back to Firefox...and it sucks.


Out of interest, what does that give you? I haven't had FF crash in months, so it wouldn't make it any more stable for me - is there some other gain from process-per-tab?


I'm sure they would gladly accept your patch for this!


I'm not getting very good numbers on my machine (much higher gc times than the article suggests). Perhaps it's because I'm on a mac, but it's a pretty new MacBook and safari seems to perform much better on a number of them.


safari seems to perform much better on a number of them

The benchmarks on the page are mostly not intended to test relative performance across browsers other than Firefox, and almost certainly do not provide useful comparison data. They were mostly designed to exercise particular performance weaknesses in Firefox, and indicate whether those performance weaknesses are improved by the new code. Micro-benchmarks in the context of very large, complex, systems, are usually pointless...except when going after particular performance issues, as the developers of Firefox are doing.


I've been investigating a similar disappointing performance of that benchmark on my Mac install of 3.6. Turns out that Firebug and Adblock Plus can both double the GC delay time.

Trying to figure out what information to collect to report that in bugzilla right now.


The number of hooks in Firefox seems likely to be a contributing factor in it being somewhat slower (in some regards) than Chrome and Safari, which are both extremely basic in their customizability and extensibility via third party plugins. Flexibility does usually have a cost, in software and in physical systems, and Firefox definitely goes to the extreme on flexibility. I'm about 50/50 on whether the trade is worth it, and I waffle between Chrome and Firefox as my primary browser.

Firebug and AdBlock Plus are both quite demanding plugins, having to analyze and manipulate the DOM so often and in so many ways. I don't think one can expect them to have no impact on performance.


Came here to make the same comment. The GC benchmark has noticeable pauses on a Core 2 Duo (early 2009) MBP running 10.6. I saw figures of at least 60+ ms when the animation jerked.


Sometimes I wonder if my MacBook is even capable of employing both cores...


I wrote a completely useless 3D effect using DOM manipulation some time ago (http://portfoli.no), and have been using it since to do my own personal benchmark of various browsers. Being horribly unoptimized, and probably riddled with flaws, it seems a fair middle ground for most JavaScripts out there.

FF3.6 is (obviously) by far outperformed by Chrome, but it seems to me that even 3.5x did a better job of running it. In either case, the 3.5->3.6 difference seems marginal for this one.


Your site is actually slower in Chrome than FF3.6 for me. Mouse over is about 10 times (!) slower and scrolling is about 2-3 times slower.


Which Chrome version is that? v3.0.195.38 runs it without a glitch here. I did a screencapture, but Jing can't quite keep up with the framerate of the animation, so that looks jumpy (http://screencast.com/t/ODQxMTdmMzg).


v4.0.249.49 for the Mac.

This isn't the only site that Chrome is slower on. There was a link on Reddit or HN a while ago about an image blurrer that was entirely written in JavaScript. FF 3.5 managed to be 2-3 times faster than Chrome for that particular page.

Chrome is faster than FF 3.6 on some sites, like Mockingbird, but it does not always outperform FF.


I've yet to try the v4 beta. Seems unlike that they've taken such a huge leap back from v3, though. I'm more inclined to say that Google's implementation on MacOS is inferior to Mozilla's.

Did you ever measure the difference with the Windows versions of the browsers, on said web sites?


No, it's been ages since I've used Windows.

In any case, FF 3.6 definitely doesn't feel slow on that site. Everything is pretty smooth except for scrolling which is a little jerky. http://www.youtube.com/watch?v=lQ2PDbffKuQ

All in all FF 3.6 is a very nice update. It's noticeably faster than 3.5 on many websites. I used to use Firefox for general browsing and keep Chrome around for a few select websites that Firefox was slow at, but with this update FF is sufficiently fast so I don't need Chrome anymore.


For me, safari feels faster than chrome on the mac. I haven't done any tests so i don't have anything to back it up with..

On Windows/Linux though, chrome is the fastest you can get.


I wanted to try it on mobile safari, but I can't trigger onMouseOver to start it.


On my HTC Hero there's about a second delay between each re-render upon mouseover. Without a keyboard I cant trigger the rotation, so it's difficult to say for sure.

I'm amazed it even renders, though. Kudos to the old Android browser for that!


I've got a pretty weak single core laptop and I have to say those benchmark tests are by far much much much faster in ff3.6, these are my results:

Garbage collection:

19 - 14

651 - 83

dom manipulations:

213 - 136

269 - 34

string:

400 100

120 122

410 16

230 66

Ok, the tests they provide are used to test those things that are supposed to get faster, so it's reasonable to believe it will, but the results are pretty good none the less.

(I ran the tests multiple times in both browsers to get the average)


I have been using chrome.jit for a while with conkeror, which leans on the Javascript engine quite hard. It makes it noticeably faster. Not a little faster, but "holy shit, that was fast" faster. Back when JIT was first shipped in a release build, I enabled it on my eeepc, but not my more-powerful 64-bit desktop (since there was no JIT for x86_64 at that time). The interface was much faster on the eee than on my desktop. (Pages loaded slower, of course, because Javascript was not the bottleneck. But the UI was much faster.)

Anyway, this is great news. Who ever thought back in 1995 that their glorified blink-tag-scripting-language would be compiled to native code? :)


One item that, uh, confused me:

> First, we noticed that a large fraction of the [GC] pause time was spent calling free to reclaim the unused memory.

How about actually implementing a garbage collector? You know, the kind that doesn't have to go around freeing memory?

(I'm being somewhat facetious, as retrofitting a precise compacting GC into a codebase not set up for it isn't trivial, but it is the right direction to move in if you actually want decent GC performance.)


I never noticed the supposed speed improvements of Firefox 3.5. In fact, it was the slowest browsing experience I've had in recent years (and yes, I tried disabling all the add-ons!). I don't have much faith that 3.6 will be noticeably faster.

Firefox, thanks for toppling the IE monopoly, but I'll be using the faster Google Chrome now.


I installed the new Firefox a few days ago, but it feels clunky, bloated, and slower than Chrome. What happened to the old Firefox that was so streamlined and light on its feet? Over time, it seems to have been transformed into the Mozilla of old. They really need to get it in gear.


It will be a competitor for Google V8?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: