-march=pentium2 + -mtune=pentium4 faster then -march=pentium4?

Kris Kennaway kris at obsecurity.org
Mon Mar 27 21:41:01 UTC 2006


On Mon, Mar 27, 2006 at 03:33:09PM -0600, Nikolas Britton wrote:
> On 3/27/06, Kris Kennaway <kris at obsecurity.org> wrote:
> > On Mon, Mar 27, 2006 at 01:05:13PM -0600, Nikolas Britton wrote:
> > > Why does GCC produce faster code using "-march=pentium2
> > > -mtune=pentium4" on a Pentium 4 chip versus plain -march=pentium4?
> > >
> > > Try it...
> > >
> > > CPUTYPE=pentium2
> > > CFLAGS+= -mtune=pentium4
> > > COPTFLAGS+= -mtune=pentium4
> >
> > Talk to the gcc developers (and provide benchmarks).
> >
> 
> What would be an adequate, proof, benchmark?

Heh..one presumes you already have such a thing (e.g. nbench as you
say below), and that you've carefully measured it in order to
formulate your conclusion.  "Carefully measured" means the usual
benchmarking rules like running your test many times and computing
statistics (e.g. using ministat), and making sure your only variable
is the thing you think it is, etc.

> I've already run several
> tests with nbench, testing all of the possible configurations of
> -march and -mtune.

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060327/2b8f05d9/attachment.pgp


More information about the freebsd-stable mailing list