Slashdot Mirror


Firefox 3.5RC2 Performance In Windows Vs. Linux

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."

8 of 240 comments (clear)

  1. Re:Don't benchmark it on Ubuntu by larry+bagina · · Score: 5, Insightful

    Firefox isn't slower because of ubuntu, it's slower because the microsoft's C compiler is better than gcc.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  2. Re:There! You have it! by Anonymous Coward · · Score: 5, Insightful

    This proves that, um, Windows,er, Linux is....um...what the fuck does this prove again?

    And why the fuck should I care if there's a 15% difference in performance of Firefox between those two OSes? I use my particular OS for reason that have nothing to do with how well Firefox runs on it.

    That 15% could very well be measured in hours when the Slashtard coders get through with their Web 2.0 abominization of Slashdot.

  3. Re:But why? by Freetardo+Jones · · Score: 5, Informative

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

  4. Re:But why? by larry+bagina · · Score: 5, Informative

    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.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  5. Re:Where's the proof that GCC is solely to blame? by characterZer0 · · Score: 5, Interesting

    Why can't they just use Intel's compiler?

    --
    Go green: turn off your refrigerator.
  6. Re:maybe linux carries some of this blame by loufoque · · Score: 5, Informative

    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.

  7. Re:Don't benchmark it on Ubuntu by Anonymous Coward · · Score: 5, Informative

    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 :-)

  8. Re:maybe linux carries some of this blame by bsmedberg · · Score: 5, Informative
    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...