Linux/Compiler Options: Difference between revisions
(add note about baseline compiler) |
(add note about -finline-limit) |
||
Line 17: | Line 17: | ||
</td> | </td> | ||
</tr> | |||
<tr> | |||
<td>gcc 4.2.1 (-Os -freorder-blocks -fno-reorder-functions -finline-limit=50)</td> | |||
<td> | |||
Note the use of -finline-limit=n. This will force many small functions and helpers to be inlined. (-O2 uses 600 as a value, for example.) On a 32-bit Linux build this results in: | |||
codesize saving of 225kb (2%)<br/> | |||
Ts win of 3%<br/> | |||
Txul win of 18%<br/> | |||
Tp2 win of about 25% (!)<br/> | |||
</td> | |||
</tr> | </tr> | ||
</table> | </table> | ||
Revision as of 21:43, 8 January 2008
Compilers
Compiler + Options | Notes |
---|---|
gcc 4.1.2 (-Os -freorder-blocks -fno-reorder-functions) |
Baseline for testing. Very similar to our reference platform, which uses gcc 4.1.1. Those options above are the default options that we use for compiling. This compiler version apparently does not inline even trivial functions.[1] |
gcc 4.2.1 (-Os -freorder-blocks -fno-reorder-functions -finline-limit=50) |
Note the use of -finline-limit=n. This will force many small functions and helpers to be inlined. (-O2 uses 600 as a value, for example.) On a 32-bit Linux build this results in: codesize saving of 225kb (2%) |
Distributions
Name |
GCC Version |
Last Build |
---|---|---|
Ubuntu 7.10 |
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) |
2.0.0.11+2nobinonly-0ubuntu0.7.10 (2008-01-07) |
gcc flags |
||
Fedora 8 |
gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) |
firefox-2.0.0.10-3.fc8 (2008-01-04) |
gcc flags |
||
CentOS 5.1 |
gcc version 4.1.2 20070626 (Red Hat 4.1.2-14) |
firefox-1.5.0.12-7.el5.centos (2008-01-07) |
gcc flags |