Gentoo's package manager (portage) is designed for compiling programs from their source code. In the rare cases that apps that take forever to compile (firefox), or that are not open-source (sun-jdk), there are binaries available.
It allows you to configure GCC to compile such that the produced machine code is optimized for your processor, instead of relying on generic x86 optimizations, and restricted instruction sets. Admittedly, the difference is not great, but it's also not insignificant when you compile everything from the kernel down (including the compiler!).
The system has USE flags, which allow you to opt in or out of certain features at compile-time. For example, enabling the MySQL USE flag compiles MySQL support in to programs that have the flag configured in their ebuild.