[wplug] what is optimized by -march in gcc?

Bill Moran wmoran at potentialtech.com
Fri May 28 08:53:54 EDT 2004


Juan Zuluaga wrote:
> I realized that many packages I compile by the
> "./configure;make;make install" cycle use -march=i586
> by default. 
> But, lucky me, I do have a Pentium MMX 266 in my
> machine :) . 
> So, I am tempted to type ./configure
> CFLAGS="-march=pentium-mmx". Would that make the
> application foo run faster,

Probably.  See:
http://www.potentialtech.com/wmoran/source.php

> or would that just make
> gcc run faster?   

No.  Generally speaking, the speed at which gcc runs
isn't controlled by anything you can do.  All those
switches are interested in optimizing the final
product of gcc.  In fact, many optimizations are
likely to cause your compilation to take longer.

> And, given that I have just 64Mb, would there be a
> memory use penalty? 

I haven't tested this, nor have heard of anyone having
problems with the code bloating under any optimizations.
That doesn't mean it doesn't happen, it just means that
it hasn't annoyed anyone enough to cause complaints.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com



More information about the wplug mailing list