[BENCHMARK]-mfpmath=sse should disable x387 intrinsics

Martin Reinecke martin@MPA-Garching.MPG.DE
Fri Nov 26 13:02:00 GMT 2004


Roger Sayle wrote:

> Could you present the performance results for your testcase with
> "-mfpmath=387", "-mfpmath=sse" and "-mfpmath=sse,387"?  It's relatively
> rare for "-mfpmath=sse" to be a win on a Pentium4 benchmark, and to quote
> Robert Scott Ladd from his Coyote Gulch benchmarking:
> 
>>From http://www.coyotegulch.com/products/acovea/acovea_4.html
>>> Much to my surprise, I have yet to find any consistent evidence that
>>> options like -mfpmath=sse improve program performance. Thus Acovea
>>> bears out my personal experience, though it does not explain why so
>>> many people continue to suggest that I should use -mfpmath=sse to
>>> generate floating-point code. If someone could suggest a good
>>> "-mfpmath=sse", I'd appreciate seeing it.

I have a real-world C++ code which gets a 10% performance gain on a P4 when compiled
with -mfpmath=sse (using the mainline compiler of 20041125). Its critical inner
loop consists of multiplications, additions and subtractions only.
Hopefully this code will be open-sourced soon; as soon as that happens, I could
contribute it as a floating-point benchmark.

Cheers,
   Martin



More information about the Gcc mailing list