On Mon, 09 Apr 2007 05:48:07 +0400, maxim wexler <[EMAIL PROTECTED]> wrote:

Hi group,

I note two schools of thought on the best CFLAGS for
the Pentium III processor.

One suggests using -O3 -pipe, the other, -O2 without
the pipe.

How much difference does this make? Is the extra level
of optimization with pipe the equivalent of the lower
level without?


Man gcc. -pipe allows to use pipes (memory) instead of temporary files (disk). -O controls the resulting binary sometimes making it fast, large, and unreliable. I have seen ebuilds that enforce -O2 even when -O3 is specified. This can create a faulty impression that -O3 always works fine.

-O and -pipe interact through the size of temporary files. Theoretically, -pipes may slow down compiles if there is not enough memory. Another factor that should be taken into account is the number of threads for make. For a PIII machine the generally recommended number is 2, but when the RAM is limited, say 384 megs, 1 thread with pipes works better.

Ideally you should measure compile times for large projects like Open Office and find out what works best on your system. I would start with 1 thread -O2 and -pipe.

--
Andrei Gerasimenko
--
[email protected] mailing list

Reply via email to