[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Compiling packages for the standard distribution with -Os instead of -O2

On Wed, 03 May 2006, Rogério Brito wrote:
> One way to mitigate the memory consumption is to, among other things,
> compile packages with optimization of GCC set to -Os, instead of -O2,

What -Os is likely to give you is much better cache locality, which might
make the code run that much faster on certain conditions.

For Etch and Sid, it is probably a good idea to use -Os instead of -O2 at
least on the bigger arches (ia32, ia64, amd64, etc), as we can probably
trust gcc not to screw up.

> [2] Bear in mind that the compiler used in testing is gcc 4.0.3, while
>     sarge's default is 3.3.x.

You should never use -Os with old gcc AFAIK. It is buggy.

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

Reply to: