Summary: | [4.5 Regression] Performance regression of generated code | ||
---|---|---|---|
Product: | gcc | Reporter: | Martin Reinecke <martin> |
Component: | tree-optimization | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | aph, gcc-bugs, jsm28 |
Priority: | P3 | Keywords: | missed-optimization |
Version: | 4.5.0 | ||
Target Milestone: | 4.5.0 | ||
Host: | i686-pc-linux-gnu | Target: | i686-pc-linux-gnu |
Build: | i686-pc-linux-gnu | Known to work: | 4.4.3 |
Known to fail: | 4.5.0 | Last reconfirmed: | |
Attachments: |
test case
assembler generated by gcc 4.5 assembler generated by gcc 4.4 Proposed wwwdocs patch to explain the apparent performance regression |
Description
Martin Reinecke
2009-12-15 08:40:58 UTC
Created attachment 19305 [details]
test case
Created attachment 19306 [details]
assembler generated by gcc 4.5
Created attachment 19307 [details]
assembler generated by gcc 4.4
This is because (quoting http://gcc.gnu.org/gcc-4.5/changes.html): "GCC now supports handling floating-point excess precision arising from use of the x87 floating-point unit in a way that conforms to ISO C99. This is enabled with -fexcess-precision=standard and with standards conformance options such as -std=c99, and may be disabled using -fexcess-precision=fast." GCC with -std=c99 makes sure to properly handle the i387 FPU excess precision. With -fexcess-precision=fast the code is as fast (and non-conforming) like with GCC 4.4. Using -std=gnu99 is also an option. > GCC with -std=c99 makes sure to properly handle the i387 FPU excess precision.
> With -fexcess-precision=fast the code is as fast (and non-conforming) like
> with GCC 4.4. Using -std=gnu99 is also an option.
Thanks a lot for pointing this out! I was aware of the floating-point change but simply had not realized it would be switched on by -std=c99.
I imagine that this might catch many people by surprise once 4.5.0 is released,
and it might be politically advisable to mention it (and the "fix") in a place where users can't miss it.
Is there a plan to mention this (in a prominent place) in the release notes?
Or in the FAQ or the "non-bugs" section of bugs.html? I can prepare a documentation patch if this is desirable.
Documentation improvement is always welcome, especially if you looked for it but missed the critical piece. Created attachment 19499 [details]
Proposed wwwdocs patch to explain the apparent performance regression
Here is a proposed patch to gcc-4.5/changes.html, which mentions the apparent performance regression (and describes how to avoid it) in the "Caveats" section.
The FSF should have my copyright assignment; in any case I think this patch is
trivial enough.
Can you please post the patch to gcc-patches@gcc.gnu.org instead? Thanks. |