Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
    
(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.) –  Shiki Mar 25 '11 at 14:25
    
+1 interesting, will this result in better benchmark results though? –  Tom Wijsman Mar 25 '11 at 15:20
    
Yes, of course. There is a project called "Pale Moon". It's a half-optimized build, and there is a HUGE difference when it comes to resource demanding pages. I'm trying to start from that point, BUT make an -O3, Core2 build, disabling almost all the "junk", resulting in a small, yet really fast browser. (Of course, I'll share the results!) Also, Pale Moon's author doesn't make x86_64 builds which gives a boost again. Try the latest trunk x86_64 build. One speedy bastard. –  Shiki Mar 25 '11 at 15:31
    
Wow, I have got to try this when I get some time. –  Joel Coehoorn Mar 26 '11 at 0:28
    
There's no -O3 flag in Visual Studio. Can you indicate what you really want? –  MSalters Mar 28 '11 at 15:04

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
1  
Wooo damn.. NICE! Thank you! –  Shiki Mar 28 '11 at 11:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.