This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCC's -ffast-math behavior
>>>>> "MB" == Miles Bader <miles@gnu.org> writes:
>> But in my experience, -mfpmath=sse will slow my code very much.
MB> Hmm, I've always found SSE FP to be a speedup -- sometimes a _big_
MB> speedup -- over 387 FP, at least when one is using mostly primitive
MB> FP operations (mul, divide, sqrt, etc) ... I think it's worth
MB> testing, at least.
Many years ago, when I asked about using -fpmath=sse on an ia32 box, the
advice was that, because the function args and return values had to be
passed on the 387 stack, most code would be much slower.
Some of the new chips seem to have specific optimizations to deal with
code which constantly moves values between registers and the stack, so
it is probably less of an issue on newer chips than it used to be.
But if one is using a newer chip, why not upgrade to -m64, too?
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6