6

I have found tons of links, resources regarding this topic. However, most of them just compile it and that's it.

I want to disable debug, enable -O3 optimization (this one fails hard at the compile.. "unknown option").

Used these:
https://developer.mozilla.org/En/Simple_Firefox_build
http://kpangilinan.wordpress.com/2010/10/08/build-firefox-on-windows-7-with-visual-studio-2010/

So. After I install all the stuff, how do I start the ./configure part (mozconfig?) and how do I get the -O3 flag working? (Extra part: How do I compile it for x86_64 ? I don't care about the "beta state", plugins tend to work, and the flash plugin just works fine.)

5
  • (About the 4.0 part: The howto shows me how to check out the VERY latest source and build that. However, I want a stable, 4.0 code base if possible.)
    – Apache
    Commented Mar 25, 2011 at 14:25
  • +1 interesting, will this result in better benchmark results though? Commented Mar 25, 2011 at 15:20
  • Wow, I have got to try this when I get some time. Commented Mar 26, 2011 at 0:28
  • There's no -O3 flag in Visual Studio. Can you indicate what you really want?
    – MSalters
    Commented Mar 28, 2011 at 15:04
  • @MSalters: Already solved... It was a misconception, in Visual Studio a -Ox flag exists for that purpose. And on an Intel processor you more likely want to use an Intel compiler than MinGW. Commented Mar 29, 2011 at 12:59

1 Answer 1

4

How I compiled an optimized version of the latest (Nightly) Firefox:

Here is what I have done:

  1. Check here for the source of the stable builds. I've took a nightly version, because that's me...

  2. Installed latest DirectX SDK, the configuration part of building informs you about this for ANGLE.

  3. Use ac_add_options --enable-optimize="-Ox -GLATFys -fp:fast -arch:SSE2"

This basically takes O2 and adds optimization options on top; check the Ox, GL, GA, GT, GF, Gy, Gs docs.
It also optimizes floating points and uses the SSE2 architecture, it disables DEBUG by default.

If you notice that one of these is wrong feel free to inform me, but this seems to work to me...

Took 1 hour to compile on my fast laptop.

enter image description here

Benchmarks of latest available versions:

Lower is better:

IE9 SunSpider: 591.4 ms +/- 6.2%
FF4 SunSpider: 275.1 ms +/- 3.6% Winner!
Chrome11 SunSpider: 301.2 ms +/- 4.8%

IE9 Kraken: 16093.0ms +/- 0.7%
FF4 Kraken: 6446.9ms +/- 0.7% Winner!
Chrome11 Kraken: 7947.7ms +/- 0.5%
Please note that previous test is written by Mozilla and might test Firefox specific advantages.

Higher is better:

IE9 V8: 2232 (R: 2097, DB: 2200, C: 3579, RT: 1697, EB: 3336, RE: 1750, S: 1687)
FF4 V8: 3716 (R: 5066, DB: 4760, C: 5318, RT: 3552, EB: 3887, RE: 1244, S: 4441)
Chrome11 V8: 7451 (R: 9976, HM: 13468, C: 11850, RT: 8304, EB: 17153, RE: 2076 S: 2714) Winner!
Please note that previous test is written by Google and might test Chrome specific advantages.

IE9 Peacekeeper: 5135
FF4 Peacekeeper: 4465

Chrome11 Peacekeeper: 8099 Winner!

Conclusion:

I'm currently running IE9 so it seems worthwhile to switch to Firefox.

As it is interesting that Chrome outperforms in the later tests, I might try to build an optimized Chrome later.
I'll benchmark the normal Firefox and an optimized Chrome later...

Versions used:

Microsoft Internet Explorer 9.0.8112.16421 RTM.
FF Minefield 4.2a1pre (2011-03-25) with -Ox -GLATFys -fp:fast -arch:SSE2.
Google Chrome 11.0.696.14 dev without optimization.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .