GCC beaten by ICC in stupid trig test!

Laurent GUERBY laurent@guerby.net
Tue Mar 23 20:49:00 GMT 2004


On Tue, 2004-03-23 at 19:46, Gabriel Dos Reis wrote:
> Joe Buck <Joe.Buck@synopsys.COM> writes:
> 
> | On Wed, Mar 17, 2004 at 05:28:40AM +0100, Gabriel Dos Reis wrote:
> | > Agreed in principle, but I think the whole point is that if you're a
> | > competent floating point programmer, you would not be using
> | > -ffast-math :-)
> | 
> | Not necessarily; a *really* competent floating point programmer can make
> | the assessment that the precision required for a particular floating point
> | task is more than adequately provided by -ffast-math.  Lossy audio coding
> | is one typical case; there are many others.
> 
> Well, lossy audio coding is not the kind of computations I would say
> involves serious floating point capabilities :-)
> But, I can see what you meant.

All Monte Carlo based algorithms are also likely to be in
the -ffast-math category. You're happy with 3-4 digits
of "accuracy" thanks to 1/sqrt(n) convergence :).

Also -ffast-math might be useful if you're not an expert in FP,
run your tests with and without, if something changes a lot
you're probably in a tricky area FP wise. Of course
if nothing changes you've not proven that much...

Laurent (who keeps 500 processors busy running Monte Carlo simulations
7/7 :)




More information about the Gcc mailing list