(Not) Why I Use Gentoo: Optimization

This entry is part 2 of 10 in the series Why I Use Gentoo Linux

One of the ways Gentoo distinguishes itself from much of the competition is its source-based nature. Most distributions provide pre-compiled binary packages to their users. Gentoo and other source-based distributions instead compile the software directly on the users’ machines during the package install process.

There is at least one major disadvantage to this approach: downloading and then compiling software is a lot slower than just downloading it. As a Gentoo user, you will often wait several minutes to several hours before you can use a new application you’ve chosen to install.

One of the oft-cited reasons to use Gentoo that supposedly makes it all worth it is the ability to customize the compiler optimization flags, or CFLAGS (and CXXFLAGS). These flags are options passed to the compiler that change how it optimizes the code.

Personally, my CFLAGS are rather mundane: “-march=native -O2 -pipe -ggdb”. It compiles code supposedly optimized for the CPU it’s running on, at a reasonable optimization level, with some extra debugging information. Some users, however, take this process to such an extreme level that they’ve earned for Gentoo users the nickname “ricers”.

Of course, optimization is not inherently a bad thing, and certain software packages will benefit from the right combination of optimization options. However, these options are most likely best determined by the developers involved, and not by the end users.

In addition, for most desktop applications, which are IO-bound (rather than CPU-bound), the performance difference between, for instance, a binary optimized for a generic i686 architecture CPU and one optimized for a Core 2 Duo will likely be unnoticeable.

In any case, while it’s nice to be able to target my CPU specifically, the ability to customize the CFLAGS and the supposed advantages have definitely been overblown. If there were a distribution that had the features I cared about, but had pre-compiled binaries instead of requiring me to wait while compiling from source, I’d probably install it right now.

Series NavigationWhy I Use Gentoo Linux(Not) Why I Use Gentoo: USE Flags

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>