Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Mozilla The Internet

Firefox 3.5RC2 Performance In Windows Vs. Linux 240

pizzutz writes "Andy Lawrence has posted a Javascript speed comparison for the recently released Firefox 3.5RC2 between Linux (Ubuntu 9.04) and Windows(XP SP3) using the SunSpider benchmark test. Firefox 3.5 will include the new Tracemonkey Javascript engine. The Windows build edges out Linux by just under 15%, though the Linux build is still twice as fast as the current 3.0.11 version which ships with Jaunty."
This discussion has been archived. No new comments can be posted.

Firefox 3.5RC2 Performance In Windows Vs. Linux

Comments Filter:
  • by mister_playboy ( 1474163 ) on Monday June 22, 2009 @03:28PM (#28427037)

    This is nothing new. Running Windows FF in WINE is faster than using Linux native FF.

  • Re:But why? (Score:5, Informative)

    by Freetardo Jones ( 1574733 ) on Monday June 22, 2009 @03:38PM (#28427255)

    The Windows version is compiled with PGO (profile guided optimization) while Linux versions aren't.

  • by Freetardo Jones ( 1574733 ) on Monday June 22, 2009 @03:41PM (#28427335)

    It has nothing to do with Ubuntu. Here are benchmarks from Firefox on Fedora: The issue is just as bad on Fedora: http://www.tuxradar.com/content/browser-benchmarks-2-even-wine-beats-linux-firefox [tuxradar.com]. That's only from a few months

  • by K. S. Kyosuke ( 729550 ) on Monday June 22, 2009 @03:47PM (#28427459)
    Surprising? Because your post *did* smell of something burning, while the MSVC claim has at least some merit - MSVC really got better. I guess it had to, it would be a shame if MS threw a couple of megabucks on it with no results at all.
  • Re:But why? (Score:5, Informative)

    by larry bagina ( 561269 ) on Monday June 22, 2009 @03:50PM (#28427529) Journal
    also worth mentioning is llvm. gcc-llvm has an llvm backend doing code generation (which sometimes beats standard gcc, sometimes doesn't). There's also a non-gcc c/objective c/c++ compiler, clang, in development, though it may be a couple years before c++ support is complete.
  • by jdgeorge ( 18767 ) on Monday June 22, 2009 @03:52PM (#28427597)

    Firefox on Windows looks great/awesome/beautiful....name it. But on Linux, it is inherently ugly. The beast looks ancient and the fonts and dialogs make matters worse.

    Folks, I am not trolling so have a look for yourselves and compare....

    I'm running Windows XP and Ubuntu 9/04 side by side on similar laptops. Just to test, I looked at the main pages for Slashdot, Wikipedia (English), and Amazon, side-by-side.

    My eyeball result of looking for differences between pages rendered with Firefox on Ubuntu 9.04 vs Windows XP:

    • Slashdot (slashdot.org): indistinguishable
    • Wikipedia (en.wikipedia.org/wiki/Main_Page): indistinguishable
    • Amazon (www.amazon.com): Bold fonts in the "Shop All Departments" navigation menu appear too big on Ubuntu; they don't quite seem to fit properly.

    Other than the issue for Amazon, the pages rendered look identical to me. The fonts for the menus look identical. I still disagree with the choice the mozilla team made to have the preferences/options menus with different titles in different locations for Linux versus Windows, but other than that, the UI seems consistent to me. The default GNOME theme for Firefox isn't as pretty as the new Firefox theme on Windows, but that's a minor aesthetic thing, and it's not ugly, it just isn't pretty.

  • by TodLiebeck ( 633704 ) on Monday June 22, 2009 @04:03PM (#28427781) Homepage

    Firefox on Windows looks great/awesome/beautiful....name it. But on Linux, it is inherently ugly. The beast looks ancient and the fonts and dialogs make matters worse.

    In Ubuntu 9.04 here, and I personally think the stock DejaVu fonts on Linux look quite nice. Actually prefer the traditional toolbar on Linux with Tango icons (tango.freedesktop.org) rather than the "enlarged back button" version found on Windows and OSX.

    The only problem I see is the topic of this thread, i.e., performance. It's slow enough to feel slow, and the fact that most Linux distros run so well on old hardware makes the problem worse.

    The bigger problem for the "Linux browsing experience" still seems to be Flash. Visiting a Flash-heavy site (like the horrible items produced by any given automaker) is a painful experience...it's bad enough that I'll typically crack open the MacBook. I find Flash sites consume an order of magnitude more CPU running natively in a Linux browser than they do running in a Windows XP VirtualBox instance hosted by the same Linux OS.

    AdBlockPlus and FlashBlock are the only things that enable me to continue to use this computer for web browsing. It's somewhat of a sad state of affairs, given that it's more than quick enough to run multiple VirtualBox instances, Eclipse instances, and a GIMP instance with dozens of files open at the same time. But give it one web page with a few Flash advertisements, and you'll think you're on a Pentium 60.

  • by hattig ( 47930 ) on Monday June 22, 2009 @04:21PM (#28428089) Journal

    Compilers aren't a simple problem that you can 'throw devs at'.

    Maybe the Intel compiler could be used, but it breaks on anything non-trivial.

    Or we can suck up the 15% performance degradation, especially if it is due to profiled optimisations on Windows, and just be happy that it is twice as fast in terms of Javascript, that might make Slashdot usable on a netbook again. It's certainly going to be faster than IE8 on Windows, and that is what most Windows users will be using in the end.

    I only hope that Canonical make it available for 8.10, because we can't all upgrade to 9.04 because some companies (looks at VIA) take 6 months to get their drivers updated.

  • by Anonymous Coward on Monday June 22, 2009 @04:26PM (#28428175)

    skin your ff and you wont tell the difference between the windows and linux version. And calling it ugly just shows that you don't bother taking a minute or two to find a theme that doesn't give you an eye sore. *very windows like*

    Here, I'll even help you out. https://addons.mozilla.org/en-US/firefox/browse/type:2/cat:all?sort=popular
    Some of the themes can blow your "beautiful" windows theme out of the H2O.

  • Re:But why? (Score:3, Informative)

    by Rockoon ( 1252108 ) on Monday June 22, 2009 @04:28PM (#28428199)
    Watcom isnt even top-3 anymore.

    The king of C compilers is now ICC, with both MSVC and GCC way behind.
  • by loufoque ( 1400831 ) on Monday June 22, 2009 @04:36PM (#28428343)

    This is a myth.
    I have barely ever noticed a performance increase when comparing code compiled with equivalent options on GCC, ICC and MSVC.

    Quite the contrary, GCC is faster more often than you'd think.

  • Re:But why? (Score:2, Informative)

    by Prune ( 557140 ) on Monday June 22, 2009 @04:41PM (#28428439)

    One can always use the Intel compiler on Linux. The performance of compiled code is comparable to that the Intel compiler produces with its Windows version.

  • by Teun ( 17872 ) on Monday June 22, 2009 @04:50PM (#28428645)
    Hmm, Adept says: Firefox Version 3.5~b4~hg20090330r24021+nobinonly-Oubuntu1 Package is maintained by Ubuntu Mozilla Team

    I run it and it works.

  • by jalefkowit ( 101585 ) <jason@jaso3.14nlefkowitz.com minus pi> on Monday June 22, 2009 @05:00PM (#28428837) Homepage
    The lag when posting a comment between hitting the "Preview" button and actually seeing the preview is downright painful.
  • by Mad Merlin ( 837387 ) on Monday June 22, 2009 @05:02PM (#28428859) Homepage

    Can gcc compile Firefox for Windows, so that we can more confidently apportion blame?

    Yes.

  • by RebelWebmaster ( 628941 ) on Monday June 22, 2009 @05:08PM (#28428963)
    See bug 418866 [mozilla.org] for some guidance.
  • by Anonymous Coward on Monday June 22, 2009 @05:10PM (#28428989)

    Visual C is not "compiler specifically implemented for x86". It supports (and supported in the past) lots of architectures -- x86, x64, Itanium, Alpha, MIPS (and MIPS16), PowerPC, ARM (and Thumb), Hitachi SuperH, Infineon TriCore, several other embedded CPUs as well.

    Of course x86/x64 are main targets, but my guess it is so for GCC as well :-)

  • Re:But why? (Score:5, Informative)

    by pz ( 113803 ) on Monday June 22, 2009 @05:26PM (#28429257) Journal

    The problem is that GCC is pretty much the only compiler on Linux used these days and while the code is very nice C++ compilers on Windows produce a bit better code still.

    In my experience, MS's VC++ produces not just a bit better code than gcc, but whole hocking meeses better code. VC++ is a damned good compiler, no matter what one might think about the company that generated it, while gcc is a merely decent one, no matter how much one might want to promote FOSS.

  • Re:But why? (Score:3, Informative)

    by David Gerard ( 12369 ) <slashdot AT davidgerard DOT co DOT uk> on Monday June 22, 2009 @05:36PM (#28429429) Homepage
    The OpenWatcom license [openwatcom.org] is OSI-approved, but I don't see why. It failed DFSG, and I asked the FSF about it and they can't make head nor tail of it either.
  • by Freetardo Jones ( 1574733 ) on Monday June 22, 2009 @05:36PM (#28429441)

    That stopped being true back in 2007 when they released version 10.0.

  • by FooBarWidget ( 556006 ) on Monday June 22, 2009 @05:57PM (#28429783)

    Unlikely to be X. I can play normal videos just fine at full speed. It's only Flash that eats CPU and is slow.

  • by multipartmixed ( 163409 ) on Monday June 22, 2009 @06:14PM (#28430027) Homepage

    Why don't you compile Tracemonkey with MSVC, GCC, and ICC, then run the sunspider benchmark. Make sure you have PGO turned on for the MSVC build.

    Then you can go eat your hat.

  • GCC, ICC, MSVC (Score:5, Informative)

    by JambisJubilee ( 784493 ) on Monday June 22, 2009 @06:41PM (#28430457)

    It is not a myth. ICC kicks the crap out of GCC. I didn't believe it until I had access to a computing cluster (Intel processors) with ICC installed. My ANSI C code runs about twice as fast using ICC than with GCC. Would you really expect anything different?

    As always, YMMV, but I suggest that anyone who doubts this to download Intel's compiler (it's free as in beer) and try it out.

    It's not open source, which does suck. But it does consistently produce faster code.

  • by bloodhawk ( 813939 ) on Monday June 22, 2009 @08:03PM (#28431811)
    It is not a Myth, GCC is a good compiler, MSVC and ICC are fantastic compilers. This doesn't make GCC bad by any means, but it is gonna be a very rare occurance that GCC produces faster code, more work and effort has been spent on the other 2 to make them that much better.
  • by msclrhd ( 1211086 ) on Monday June 22, 2009 @08:18PM (#28432015)

    It will depend on what compiler settings were used to build the glibc library, what architecture it was tuned for, whether or not the glibc library is targeted to the specific version of the kernel you are using. It also depends on what options were used to build the companion libraries, as well.

    Also, the last time this was discussed on slashdot, I seem to remember that it was Profile Guided Optimisation (PGO) that helped FF on Windows. This would allow the compiler to better structure the machine code to keep as much of the program running in the CPU cache as possible (by pre-loading branches in conditional statements that are executed more frequently).

  • by asa ( 33102 ) <asa@mozilla.com> on Monday June 22, 2009 @09:24PM (#28432839) Homepage

    The Javascript speed is not much of a factor. The one truly annoying thing with Firefox is the gawdawful Adobe Flash plug-in that hangs up at random, causing the whole browser to come to a screeching halt.

    So why not get Flashblock or remove the Flash plugin?

  • Re:But why? (Score:3, Informative)

    by amdpox ( 1308283 ) on Monday June 22, 2009 @10:47PM (#28433739)
    Wine runs the code almost raw - the only difference to running on windows is that Win32 API calls are handled by Wine rather than Windows. All the computation that Firefox itself does is run exactly as it is on windows, ad thus the optimisations MSVC makes to the machine code are still there when it's run under Wine.
  • by bsmedberg ( 955986 ) on Monday June 22, 2009 @11:05PM (#28433901) Homepage
    Mozilla does comparative performance testing for the best GCC compiler flags constantly. There are several reasons why our Linux builds are slower than Windows:
    1. The Windows ABI is cheaper: every relocated symbol in Linux is resolved at runtime by loading the PIC register and going a GOT lookup. Windows avoids PIC code by loading the code at a "known" address and relocating it at startup only if it conflicts with another DLL.
    2. Mozilla code runs fastest when 99% of it is compiled for space savings, not "speed". Because of the sheer amount of code involved in a web browser, most of the code will be "cold". Tests have shown that at least on x86, processor caches perform much better if we compile 99% of our code optimizing for codesize and not raw execution time: this is very different than most compiler benchmarks. The MSVC profile-guided optimization system allows us to optimize that important 1% at very high optimization levels; the GCC profile-guided optimization system only really works within the confines of a particular optimization level such as -Os or -O3. In many cases using PGO with Linux produced much *worse* code!
    3. The GCC register allocator sucks, at least on register-starved x86: we've examined many cases where GCC does loads and saves that are entirely unnecessary, thus causing slowdowns.

    Believe me, we'd really love to make Linux perform as well as Windows! We spent a lot of time in Firefox 3 with libxul reducing startup time by making symbols hidden and reducing the number of runtime relocations...

  • by True Grit ( 739797 ) * <edwcogburn@gma[ ]com ['il.' in gap]> on Tuesday June 23, 2009 @01:02AM (#28434911)

    improving performance on its most popular platforms if they want to remain relevant...

    You don't understand, GCC's portability is the reason for its very existence. Thats not optional. GCC has got more than 20 backends (architectures) and 8-10 frontends (languages) for goodness sake, no freakin' wonder its a little slower than MSVC/ICC, those latter guys only have to worry about 2 backends (x86/x86_64) and 2 frontends (C/C++).

    GCC's wide portability is what currently guaranttees its relevancy. The minute GCC starts chasing clock cycles on the x86 platform (at the expense of the others), that will be its curtain-call...

  • by BZ ( 40346 ) on Tuesday June 23, 2009 @09:12AM (#28437747)

    > So why isn't the Moz Foundation investing in a better compiler?

    This is a good question; I believe it's largely a matter of not having found anyone to pay to do the work, but I'm not privy to details on this stuff...

    > what does this say about the performance of any app running under Linux compared to the
    > Windows version?

    That if performance is gated on computation and codesize, and the code identical, it'll tend to be faster on Windows....

    Thing is, for most apps performance is gated on I/O or display (if gated at all) more than on computation and codesize.

To the systems programmer, users and applications serve only to provide a test load.

Working...