|
Loading...
|
gcc-help@gcc.gnu.org
[Prev] Thread [Next] | [Prev] Date [Next]
Re: GCC's -ffast-math behavior Tim Prince Fri Feb 10 05:01:41 2012
On 2/10/2012 1:39 AM, Miles Bader wrote:
xunxun<[EMAIL PROTECTED]> writes:If you switch to using SSE floating-point, e.g. using "-mfpmath=sse", it will still call the library functions even when using -ffast-math (because the SSE unit doesn't have special instructions like "fsin" or "f2xm1"). I think SSE FP is typically faster than the 387 for many CPUs anyway.Well, that's right. But in my experience, -mfpmath=sse will slow my code very much.Hmm, I've always found SSE FP to be a speedup -- sometimes a _big_ speedup -- over 387 FP, at least when one is using mostly primitive FP operations (mul, divide, sqrt, etc) ... I think it's worth testing, at least.
387 code may be faster when you mix float and double, e.g. by forcing double evaluation of float expressions by removing the f suffix from constants. It has been a long time since I had 32-bit OS installed and could examine the broken mathinline.h headers which typically came with them. You would need to fix those before trying -ffast-math.
-- Tim Prince
- Re: GCC's -ffast-math behavior, (continued)
- Re: GCC's -ffast-math behavior Andrew Haley 2012/02/09
- Re: GCC's -ffast-math behavior xunxun 2012/02/09
- Re: GCC's -ffast-math behavior Andrew Haley 2012/02/09
- Re: GCC's -ffast-math behavior xunxun 2012/02/09
- Re: GCC's -ffast-math behavior Andrew Haley 2012/02/09
- Re: GCC's -ffast-math behavior xunxun 2012/02/09
- Re: GCC's -ffast-math behavior xunxun 2012/02/09
- Re: GCC's -ffast-math behavior Miles Bader 2012/02/09
- Re: GCC's -ffast-math behavior xunxun 2012/02/09
- Re: GCC's -ffast-math behavior Miles Bader 2012/02/09
- Re: GCC's -ffast-math behavior Tim Prince 2012/02/10 <=
- Re: GCC's -ffast-math behavior James Cloos 2012/02/16
- Re: GCC's -ffast-math behavior Miles Bader 2012/02/16