Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jul 2005 20:49:09 -0700
From:      "David O'Brien" <obrien@freebsd.org>
To:        Olexandr Konovalenko <kono@kth.se>
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: better optimization flags for opteron (amd64)// -ffast-math and -O3 are not friends
Message-ID:  <20050722034909.GD41313@dragon.NUXI.org>
In-Reply-To: <49213.130.237.35.96.1121786769.squirrel@webmail.sys.kth.se>
References:  <49213.130.237.35.96.1121786769.squirrel@webmail.sys.kth.se>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 19, 2005 at 05:26:09PM +0200, Olexandr Konovalenko wrote:
> I found that on my system combination of -ffast-math AND -O3 is slower than
> -O0 on AMD64 (interestingly it is true for Xeon EM64 as well), how can it be?
> though just -O3 gives fastest double precision floating point computations.

-O3 does a lot more than just FP optimizations.  It also does a lot of
inlining that can blow your caches.  It is a falicay that -ON is better
than -ON-1 level.  Look in the GCC manual at http://gcc.gnu.org - you'll
see all the optimizations that -O3 implies.  Start with -O2 and add ones
from the -O3 list to find the best performance for your benchmark on your
machine.

-- 
-- David  (obrien@FreeBSD.org)



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