Please create an account to participate in the Slashdot moderation system

 



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 petrus4 ( 213815 ) on Monday June 22, 2009 @02:23PM (#28426951) Homepage Journal

    Ubuntu typically has everything but the kitchen sink running in the background; it's even worse than XP for frivolous defaults.

    Get Slackware, or something else minimalistic, where you're likely to have a marginal amount of memory left after the operating system and residents are loaded in. ;)

    • by larry bagina ( 561269 ) on Monday June 22, 2009 @02:27PM (#28427029) Journal
      Firefox isn't slower because of ubuntu, it's slower because the microsoft's C compiler is better than gcc.
      • by Locke2005 ( 849178 ) on Monday June 22, 2009 @03:26PM (#28428169)
        I am SHOCKED and AMAZED that a compiler specifically implemented for x86 (with assistance from Intel) produces more efficient x86 machine code than a compiler that is based on a general purpose architecture with just a back-end code generator for x86. Next you'll be telling me that a Swiss army knife isn't as good for skinning animals as a Bowie knife and that an amphibious vehicle is neither as fast on land as a Ferrari nor as fast in the water as a cigarette boat!
        • by Anonymous Coward on Monday June 22, 2009 @04: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: (Score:2, Insightful)

          by R2.0 ( 532027 )

          "Next you'll be telling me that a Swiss army knife isn't as good for skinning animals as a Bowie knife "

          Actually, in most cases one would be better off with a Swiss Army type knife than a Bowie knife. Even on a large animal, parts of the skinning process are delicate and take a light touch, and the smaller blades are better at that. And then get to smaller animals - may as well just beat that rabbit with a rock as use a Ka-Bar. In addition, the saw blade of a SA knife is handy for cutting cartilage, etc.

          A

        • Re: (Score:2, Insightful)

          by Anonymous Coward

          I am shocked and amazed that the company which destroyed all competing commercial compilers by hiring their best developers away now has a really good compiler.

        • by selven ( 1556643 ) on Monday June 22, 2009 @06:13PM (#28430985)
          Just because you can justify Linux's inferiority in this one area doesn't mean that we don't need to improve it.
          • by msclrhd ( 1211086 ) on Monday June 22, 2009 @07: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 Freetardo Jones ( 1574733 ) on Monday June 22, 2009 @02: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

      • When did Slashdot become such a COW?

        Seriously, I try to scroll and the delay is very noticable to the point of annoying. I can load other large pages and scroll no problem. Is it a javascript performance issue or Firefox?

        • by rts008 ( 812749 ) on Monday June 22, 2009 @05:04PM (#28429881) Journal

          It's /. and it's sorry assed javascript, not firefox.
          I went to preferences and chose 'classic view' to end this assclown behavior. That also ended the funny bars showing up in the middle of replies, the friend/foe icons plastered on top of comments, and other asshattery that was going on here also.

        • by pohl ( 872 )

          Yes, I'm certain that javascript is the problem. Slashdot has been unusable for me in mobile Safari on my 1st generation iPhone running version 2.0 of the software. The recent 3.0 upgrade made it usable, but still sluggish and with wierd random behaviour.

    • by mR.bRiGhTsId3 ( 1196765 ) on Monday June 22, 2009 @03:34PM (#28428295)
      You know all that stuff that's running in the background. Well, it's running in the background, which means that most of it should be swapped out and it shouldn't wake up very often to do stuff.
    • What's your point? Both are presented as general-purpose desktop operating systems (Slackware has some proponents who will try and claim that status for it too, but most of them wouldn't get very far). At the very least, try it on another "user-friendly" desktop-oriented distro.

      Of course, they're also benchmarking on a 2-month-old build of Ubuntu (designed for the capabilities of modern hardware, and the features of a modern OS) vs. on a 92-month-old build of Windows. When XP came out, it said that its mini

  • But why? (Score:2, Interesting)

    by Anonymous Coward

    Is there any explanation as to why there is the difference?

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

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

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

      • Re: (Score:3, Interesting)

        by guyniraxn ( 1579409 )
        What if we threw SwiftFox in to the comparison?
        • Re:But why? (Score:4, Interesting)

          by electrosoccertux ( 874415 ) on Monday June 22, 2009 @07:30PM (#28432171)

          It feels just as slow. It's not just Gnome, it's slow in KDE and XFCE, too.
          It is currently faster to run Firefox.exe under Wine than it is to run it native in Linux. (Yes I have tried this, the difference is night and day; it's just as fast in Wine as it is in windows).

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

      by moon3 ( 1530265 ) on Monday June 22, 2009 @02:44PM (#28427407)
      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.

      But when I mention Watcom C++ or other aspiring open source compiler here, a compiler that could possibly interest Linux community and spawn some competition for GCC then I get modded down often by people citing GCC is good enough for everybody and everything.
      • Re:But why? (Score:5, Informative)

        by larry bagina ( 561269 ) on Monday June 22, 2009 @02: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.
      • Didn't gcc 4.0 strip out all the processor-specific optimizations? I don't think it has ever been put back in. Sure, optimizing for x86 and not other processors shows a certain bias, but I'll take x86 bias over poorly optimized code any day.
      • by Locutus ( 9039 )

        in the 90s, the Watcom compiler produced some of the fastest code out there. I know it was open source and is still used but it would be interesting to see what it could do in cases like this. If it's as good as it used to be, showing a 15% improvement and eliminating any speed advantage MS compilers might have would be eye opening for many who might consider gcc the only compiler for GNU/Linux software.
         

        LoB
         

      • Re: (Score:2, Informative)

        by Prune ( 557140 )

        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.

      • Isn't there also an Intel compiler available for Linux?
      • Re:But why? (Score:5, Informative)

        by pz ( 113803 ) on Monday June 22, 2009 @04: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: (Score:3, Informative)

        by David Gerard ( 12369 )
        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 rbanffy ( 584143 )

        GCC _is_ good enough for a lot of stuff.

        I would consider other compiler if it can compile all of my current distro to all architectures it supports. I find the x86 world remarkably boring,

    • by asa ( 33102 )
      In addition to a compiling process called profile guided optimization, or PGO, it's also a safe bet that the Windows compiler just spits out better (faster and smaller) results than the Linux compiler.
    • The Microsoft C compiler generates very well optimized code. It has beat out GCC by 10% or more since time immemorial.
  • How well does it perform on Vista?

    • This is a strange question. "Ok, so it's slow on mainstream Linux distros. I bet its slow on Vista, too!" I don't think it IS as slow on Vista, but I fail to see how that question does anything but try to say "Vista is just as bad as Linux."

      Which, considering the fact that most geeks are more of the opinion that "Vista is a garbage can in comparison to the Taj Mahal/Buckingham Palace/[Insert Expensive Cool Place] that we call Linux," seems to be rather fruitless. Unless, of course, you're willing to adm

      • It does seem weird however to compare the performance of an app on the latest version of Ubuntu versus that of the previous (and now 8 year old) version of Windows. I'm sure it's even quicker on Windows 2000.

  • by asa ( 33102 ) <asa@mozilla.com> on Monday June 22, 2009 @02:47PM (#28427471) Homepage
    Putting the blame all on Firefox when there's no doubt a certain amount of performance penalty that comes with a Linux's less good compiler is just lame. How about telling the linux tool makers to build tools that output faster and smaller code instead of demanding that app developers solve those problems? Finally, what "linux" build was this? Did it use profile guided optimization and other performance features of Mozilla's official Windows build system? If not, you're comparing apples to oranges.
    • Re: (Score:2, Interesting)

      by gilesjuk ( 604902 )

      Indeed, GCC just isn't as good at producing fast code as Microsoft or Intels compilers. This is probably the price you pay for having a fairly portable compiler such as GCC.

      • by loufoque ( 1400831 ) on Monday June 22, 2009 @03: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: (Score:3, Informative)

          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 @05: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.

        • Re: (Score:3, Interesting)

          by asa ( 33102 )
          Got links? I'd love to see some support for this. Until I get those, I'm going to take the large number of anecdotal accounts from the people who actually compile popular apps like Firefox on Windows and Linux as having a bit more weight than your lone voice without any supporting evidence or even specif anecdotes.
        • Re: (Score:2, Informative)

          by bloodhawk ( 813939 )
          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.
        • Why is it important to use equivalent options?

          If, for argument's sake, MSVC has a feature that's missing from GCC and this feature results in 5% faster code for some app -- well, more power to MSVC.

        • by bsmedberg ( 955986 ) on Monday June 22, 2009 @10: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 sjames ( 1099 )

        And for not surrendering your first-born in order to have as many copies of it as you like.

    • Usually they profile the windows versions, and don't profile the linux ones.

      Why? No clue.

      • Re: (Score:3, Informative)

        See bug 418866 [mozilla.org] for some guidance.
      • by asa ( 33102 )
        Mozilla doesn't compile the Linux builds in widespread use. If you're wondering why Firefox wasn't compiled with profile guided optimizations, ask your Linux distros. They're ultimately responsible for it since they cut Mozilla out of the process years ago. Your vendor relationship for Firefox is with Ubuntu or Red Hat, not with Mozilla. That's what the Linux distros demand and so that's the way it's probably going to stay.
    • My guess is Mozilla uses /GL option for visual c++ to do whole program optimization (if not, they should). Afaik this is currently not possible in gcc for C++ code except by cat'ing or #including all your files together into one.

      In something huge like firefox there are probably a bunch of accessors and small functions that can be inlined to make a smaller *and* faster binary, if only the compiler can see the method implementation.

  • by pembo13 ( 770295 ) on Monday June 22, 2009 @03:05PM (#28427819) Homepage

    I keep hearing people saying that it's all GCC's fault, but I have seen no real proof of that. Nor why a profit making company such as Mozilla can't throw devs at GCC to fix the underlying problem.

    • by characterZer0 ( 138196 ) on Monday June 22, 2009 @03:14PM (#28427985)

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

      • Re: (Score:2, Flamebait)

        by Dr. Spork ( 142693 )
        I also wondered this! For one thing, it would make Stallman's head explode, but we might as well get the sad and inevitable event behind us and all use the best compiler we can get for all Linux projects.
      • by mR.bRiGhTsId3 ( 1196765 ) on Monday June 22, 2009 @03:41PM (#28428435)
        Its my understanding that a bunch of the firefox core is written in C++. ICC uses a different name mangling scheme that GCC, so you can't link C++ code compiled with ICC with code compiled by GCC.
        • by Freetardo Jones ( 1574733 ) on Monday June 22, 2009 @04:36PM (#28429441)

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

          • Re: (Score:3, Insightful)

            Well, I guess the only reason to not compile with ICC is that "0h N0es! iNtel is t3h unfr33!" because every piece of literature I'v ever read suggests ICC produces slightly larger binaries which are greatly faster when compared to GCCs output. In fact, for this reason I seem to remember a whole bunch of guides from the olden days on Gentoo for how to install ICC.
            And thus, the lesson we have learned is that when you have the engineers who designed the architecture on hand, you can write a kickass compiler.
      • Re: (Score:3, Interesting)

        by asa ( 33102 )

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

        Who is "they"?

        Builds created by Mozilla get used but very few people compared to builds made by Ubuntu and other Linux distros. Perhaps you should contact them and as them why they're not using the Intel compiler.

    • Re: (Score:2, Informative)

      by hattig ( 47930 )

      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 Canoni

    • by asa ( 33102 )
      Mozilla's expertise is in Web browsers and the Internet, not in code compilers. Your suggestion makes about as much sense as telling Mozilla it should be funding development of faster hard drives or better LCDs. They'd all improve the Firefox experience, but don't really make a lot of sense for a browser vendor to be doing. As for GCC being inferior to other compilers, I'd recommend you ask that team directly. I'm sure they'll give you an honest answer.
  • Everything in these kind of tests usually makes MS and Intel compilers stand out vs gcc. On the desktop, the Wintel platform is shit slow all the time. I care for the latter. no 27 different systray update services for different crapware, the crapware, antivirus, etc running - just the apps and system services I have actually opted for,
  • by godrik ( 1287354 ) on Monday June 22, 2009 @03:49PM (#28428597)
    Are there around some tests about other open source software that could help us understand the problem ? We can find some on open office : http://www.oooninja.com/2009/03/multiplatform-benchmark-30.html [oooninja.com] Or Tomcat : http://mediakey.dk/~cc/tomcat-performance-linux-faster-than-windows/ [mediakey.dk] But that does not seem to gie a clear understanding of what's happening.
  • 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.

Avoid strange women and temporary variables.

Working...