canmove, Confirmed users
1,577
edits
(add a note about how to use --enable-optimize) |
(just include dwitte's comments directly) |
||
Line 9: | Line 9: | ||
=Compilers= | =Compilers= | ||
Notes from dwitte on gcc 4.3 vs. 4.1.2. [https://bugzilla.mozilla.org/show_bug.cgi?id=409803#c17] Also see the [https://bugzilla.mozilla.org/show_bug.cgi?id=409803#c0 original post] about possible ways to make gcc 4.1.2 faster as well by using -Os and -finline-limit. | |||
< | <pre> | ||
i've tested gcc 4.3 a bit. to summarize, it looks like this pathological -Os | |||
behavior is specific to 4.1 branch, and possibly just 4.1.2. also, there are | |||
some substantial perf and codesize wins to be had with gcc 4.3. | |||
gory details: tested with gcc 4.3 (20080104 pull). "stock configuration" is | |||
"-Os -freorder-blocks -fno-reorder-functions". some Tp2 numbers: | |||
baseline: gcc 4.3, stock: 142.78 ms | |||
stock, with -finline-limit=50: 146.89 ms (+2.9%) | |||
-O2: 131.56 ms (-7.9%) | |||
for comparison with previous results (comment 0): | |||
gcc 4.1.2, stock: 199 ms (+39%) | |||
stock, with -finline-limit=50: 149.33 ms (+4.6%) | |||
-O2: 142.67 ms (even) | |||
|size libxul.so| | |||
gcc 4.3, stock: 12,387kb | |||
stock, with -finline-limit=50: 12,325kb (-62kb) | |||
-O2: 15,061kb (+2,674kb) | |||
gcc 4.1.2, stock: 13,249kb (+862kb) | |||
stock, with -finline-limit=50: 13,025kb (+638kb) | |||
-O2: 15,440kb (+3,053kb) | |||
a few points from this data: | |||
1) -Os is very sane on 4.3 by default. | |||
2) on 4.3, relative to -Os, -O2 has improved a lot (8% Tp win, although at a | |||
2.7Mb codesize cost). | |||
3) 4.3 is 5 - 8% faster on Tp2 than 4.1.2, depending on -Os/-O2. | |||
4) 4.3 gives an 400-800k codesize saving over 4.1.2. | |||
3 & 4) are probably the same thing - a result of the hidden visibility | |||
propagation improvements introduced in gcc 4.2. these are a major win for us. | |||
=Distributions= | =Distributions= |