Short bio: Computer Scientist, FOSS supporter (read more)
Tux Machines (TM)-specific
All binary distributions make these choices for you, but building from source, Gentoo users can decide for themselves. They are able to choose what CPU their binaries will be built for, as well as GCC optimizations.
The -O1 option begins the optimization, with -O2 and -O3 optimizing further. The special -Os option optimizes code for size. It enables all the options from -O2 which do not increase the size of the code and is especially useful for low-memory systems. Today Linux Magazine benchmarks three of the most common, -Os, -O2 and -O3.
The computer system used in these tests is an Intel Core2 CPU, and as such Gentoo was compiled in 64bit with the “-march=core2″ CPU type. Ubuntu is included for comparison purposes. Jaunty Jackalope 9.04 was chosen because it is the current stable version and more closely matches the Gentoo system, with the exception of the kernel which is two versions behind. Each installed system is just the base with any required dependencies for testing, plus XOrg and Xfce4.