Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jul 2000 16:38:01 -0500
From:      "Jeffrey J. Mountin" <jeff-ml@mountin.net>
To:        Otter <otterr@telocity.com>, Dave Boers <djb@ifa.au.dk>
Cc:        stable@FreeBSD.ORG
Subject:   Re: Recommended compilation optimizations
Message-ID:  <4.3.2.20000725153431.00d66d60@207.227.119.2>
In-Reply-To: <Pine.BSF.4.21.0007241853130.329-100000@kashmir.telocity.co m>
References:  <20000724152021.A61713@relativity.student.utwente.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
At 06:54 PM 7/24/00 +0000, Otter wrote:
>what about the -march=pentiumpro flag? there's a bunch more
>possibilities listed if you man gcc. keep in mind that the more opts you
>add in, the longer it will take to compile something.

And -march=pentiumpro differs from -march=i686 in what way?  No sarcasm, 
just pointing this out since both have been mentioned.

Using -march implies -mcpu, so '-march=X -mcpu=X' is the same as 
'-march=X'.  Dropping the -mcpu means less clutter on the screen.  Just as 
using i?86 does.

When combined with anything above -O (-O2) will tend to blow up, either all 
the time or more often.  From what I have seen/read this is not the case 
with just -mcpu=X.


Throwing flags for fun isn't advised and in most cases the improvements are 
minimal.  After reading the man pages, etc, some make sense to have (ie 
-march and -cpu).  However, don't recall ever seeing any performance 
data.  OTOH, there can be significant changes.  Then one must decide if the 
program is used enough to justify the risk.  Talking system here, not 
ports, which do their own thing in most cases, unless you have CFLAGS 
set.  Most ports will take a -O2, but then you need to change it back 
before doing the world.

Frankly I got tired of switching (and forgetting to) and just stick with 
'-O -pipe' and hack the ports as needed/desired.  As mentioned it is also 
faster building world.  AFAICR, about 15% faster using '-O -pipe' than '-O2 
-pipe'.

.02


Jeff Mountin - jeff@mountin.net
Systems/Network Administrator
FreeBSD - the power to serve



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.3.2.20000725153431.00d66d60>