Re: Compiling : optimizing for CPU ? On Thu, 12 Aug 2004 18:15:30 +0000, Gauthier wrote:
> Hello,
>
> When creating a package for own usage (so it doesn't need to be
> portable), is it interessant to specify a particular architecture with
> the -mcpu=cpu-type and -march=cpu-type of gcc instead of the default
> 386 ?
Probably: yes.
> Is it really a gain in speed,
Between i386 and i686 it /is/ for most things. However behond that: not
much. IME though, i586 as opposed to i486 doesn't generally gain much.
> or other advantage ?
Idunno.
> Thanks in advance,
Well, you might want to use "-O2". And "strip" the generated binaries.
Other then that, some specific programs doing math stuff gain some speed
from setting: MMX, 3D-Now, SSE, or whatever, options.
--
-Menno. |