LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Firefox 4 speed (http://www.linuxquestions.org/questions/slackware-14/firefox-4-speed-878539/)

lonestar_italy 05-03-2011 08:27 AM

Firefox 4 speed
 
Hi,

few days ago I read this: http://digitizor.com/2011/04/30/ff6-fast-less-sluggish/ and I thought: cool!

Then I thought more: but... wait... on Slackware, Firefox 4 is being compiled from sources, and Slackware 13.37 uses GCC 4.5.2! This should mean we're already enjoying a faster Firefox compared to the average one, without waiting for version 6!

Did I think it right? :)

H_TeXMeX_H 05-03-2011 08:36 AM

So, they mean FF is faster on Window$ ? That's BS. I've used FF on both, and even back in the day it was slower on Window$.

bsdunix 05-03-2011 08:41 AM

Logically that would make sense, but speed testing is relative to the hardware at hand and how well the software code is optimized.

That being said, my unscientific test of FF4 in Slack64 13.37 shows no performance degradation compared to the latest FF3 in Slack64 13.1 on the same computer. ;)

disturbed1 05-03-2011 08:51 AM

Quote:

Originally Posted by lonestar_italy (Post 4344984)
Hi,

few days ago I read this: http://digitizor.com/2011/04/30/ff6-fast-less-sluggish/ and I thought: cool!

Then I thought more: but... wait... on Slackware, Firefox 4 is being compiled from sources, and Slackware 13.37 uses GCC 4.5.2! This should mean we're already enjoying a faster Firefox compared to the average one, without waiting for version 6!

Did I think it right? :)

I think you missed this part -
Quote:

with aggressive optimization (-O3) and profile guided optimization enabled.
Slackware's Firefox is built with -O. Which is the safe, mature, and most compatible option. Even using -O2 or -Os can lead to strange rendering errors. PGO is nice on paper, not 100% in real life though.

Personally I'd much rather have a stable, fully compatible Web Browser that renders the majority of websites correctly, rather than one that produces 0.000000002% better benchmark numbers, crashes now and then, and fails to render some sites --- for that we have Google Chrome :p

H_TeXMeX_H 05-03-2011 09:05 AM

Quote:

Originally Posted by disturbed1;4345007
Slackware's Firefox is built with -O[b
.[/b] Which is the safe, mature, and most compatible option. Even using -O2 or -Os can lead to strange rendering errors. PGO is nice on paper, not 100% in real life though.

Are you sure about that ? Because I've been using -O2 for some time and have not had rendering errors because of it. I've had rendering issues mostly because of font sizes that I use (large).

disturbed1 05-03-2011 09:17 AM

Quote:

Originally Posted by H_TeXMeX_H (Post 4345022)
Are you sure about that ? Because I've been using -O2 for some time and have not had rendering errors because of it. I've had rendering issues mostly because of font sizes that I use (large).

Positive.

O2/Os does work pretty good here on a couple of PCs, but have seen some strange rendering errors on other PCs. We have 15 or so PCs here, and a handful of laptops. I've seen enough corruption and failed renderings to not deploy it.

Could have sworn it was well known that Mozilla's code base is messy and not optimization friendly.
https://bbs.archlinux.org/viewtopic.php?id=86692
I'm sure Google will turn up a few 1000 other hits.

brixtoncalling 05-03-2011 09:18 AM

Why would GCC compiler optimisation flags (-O2, -O3 or any other) cause the binary to be functionally different?

disturbed1 05-03-2011 09:29 AM

Quote:

Originally Posted by brixtoncalling (Post 4345039)
Why would GCC compiler optimisation flags (-O2, -O3 or any other) cause the binary to be functionally different?

Sometimes, misinformation around the Internet leads people to believe that passing flags will automagically create faster binaries. This is done without understanding the code base.

Firefox is already optimized. Each module that Firefox compiles has a different optimize level. Cairo, pixman and sqlite are compiled at -O2 by default, while the js engine uses -O3. I trust the Mozilla devs know their own code better than I do :)

Each -O level adds compiler option.
http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

H_TeXMeX_H 05-03-2011 09:40 AM

I would never use -O3, I've seen first hand how this causes instability and problems in programs. In FF I have not noticed any major issues with -O2, so I'll keep using it.

brixtoncalling 05-03-2011 09:42 AM

Quote:

Originally Posted by disturbed1 (Post 4345050)
Sometimes, misinformation around the Internet leads people to believe that passing flags will automagically create faster binaries. This is done without understanding the code base.

I didn't say faster or slower. I am asking (genuinely) why compiler optimisation would create a functionally different binary (ie a Firefox binary with rendering errors).

disturbed1 05-03-2011 10:00 AM

Quote:

Originally Posted by H_TeXMeX_H (Post 4345066)
I would never use -O3, I've seen first hand how this causes instability and problems in programs. In FF I have not noticed any major issues with -O2, so I'll keep using it.

Exactly, and I should have stated that - If it works for you use it!
I did do a couple of PGO builds before, but found the fruit not worth the labor :)

Quote:

I didn't say faster or slower. I am asking (genuinely) why compiler optimisation would create a functionally different binary (ie a Firefox binary with rendering errors).
Each O level compiles the source code in a different manner. If you scan over that link I posted, it states what each optimization level adds. Some source code just does not play well with higher O levels, once in a while there will be no difference, the code fails to compile at all .... the differences are vast. GCC itself has been known to produce errors as well.

H_TeXMeX_H 05-03-2011 12:42 PM

Definitely the PGO is highly overrated, I just use basic, safe compile optimizations '-march=native -O2 -pipe -fPIC' and maybe run sqlite vacuum once in a while.

rmjohnso 05-04-2011 07:25 AM

I think the discussion around compiler flags is interesting, but to bring the discussion back to the OP's question...

If you are running Slackware 32-bit, then you are using a binary that the Mozilla team releases and that Pat V. repackages as a Slackware package. If you are running Slackware 64-bit, Pat V. compiles Firefox from source. I think with Firefox 4, the Mozilla team has started to release pre-compiled 64-bit versions, but I could be mistaken.

H_TeXMeX_H 05-04-2011 07:47 AM

Quote:

Originally Posted by rmjohnso (Post 4346100)
I think with Firefox 4, the Mozilla team has started to release pre-compiled 64-bit versions, but I could be mistaken.

Yes, they do. However, I just compile it.

lonestar_italy 05-04-2011 08:30 AM

Quote:

Originally Posted by bsdunix (Post 4344999)
That being said, my unscientific test of FF4 in Slack64 13.37 shows no performance degradation compared to the latest FF3 in Slack64 13.1 on the same computer. ;)

uh? FF4 should be something like 10 times faster than FF3 on same system! how can you see no difference?


All times are GMT -5. The time now is 12:25 PM.