[SunRescue] Code Optimization -- was RE: GCC code generation sucks....

Chris Byrne rescue at sunhelp.org
Mon Apr 30 00:13:56 CDT 2001


Dave McGuire Sent:
>
>So GCC's performance on the Pentium-of-the-week is great, while on
everything else it blows dog.
>

Actually I'll have to take issue on that one. GCC's code is great on the
pentium of 1995. On P-PRO/P-II the code is OK, on P-III and Athlon the code
is, to put it mildly, sub-optimal, and on P4 it blows chunks.

Why? Because no good work has gone into optimizing GCC for new x86 platforms
since they wrote the 586/686 extensions. Hell 90% of the x86 code out there
is still compiled with 386 or 486 optimization.

Each successive processor architecture has had a deeper pipeline, different
branch prediction and OOI architecture, vastly different microarchitecture
opimizations, and completely different cahce sizes and access patterns. All
of these changes in processors require changes in compiler optimization.

Hell even Visual Studio 6 produces code optimized for first gen Pentiums
unless you do some serious freaking around.

Honestly I think Intel is in serious trouble with the P4 unless they can
convince half the world to recomplie.

Chris Byrne




More information about the rescue mailing list