Re: Lus paa tjaerekost (or molasses in january)

Richard Henderson (
Mon, 11 Nov 1996 15:21:25 -0600 (CST)

> The reason it looks comparable to a 200MHz Pentium is mainly because you
> compare different things. The compiler may be similarly named, but compiling
> for x86 and compiling for alpha are pretty different things. Gcc is for some
> reason much slower on the alpha than on an x86. My personal guess is that
> there is either some instruction scheduling issue or some O(exp(n)) routine
> wrt number of registers or similar.

There are two killers that I know of:

-- The bits that try to convert to conditional moves has a bad
exponential worst case, that isn't really that uncommon in largish
functions. Some of you may remember an example posted here some
months ago (extracted from the X server I believe) that took > 20
minutes to compile.

-- Quite a bit of effort goes into figuring out how to load
constants > |32k|.

Aside from that, I'm pretty sure instruction scheduling is an O(n**2)
algorithm; I've not looked at the register allocation bits.

Anyway, none of these is an issue with the standard i386 compiler.

If you use the pentium gcc, you'll encounter the conditional move
problem and the instruction scheduling problem (though not as bad).

> And yes, I think it's sad too, as compiling is what I do most. The alpha
> does make it up in other areas, but it's still sad..

Sad, but I'd have to say somewhat unavoidable for highly optimized
code, as so many of the optimizations require exhaustive searches
for pattern matches. It would be interesting to see what could be
changed to make -O quicker, and let -O2 continue to chug along....


To unsubscribe: send e-mail to with
'unsubscribe' as the subject.  Do not send it to

Feedback | Store | News | Support | Product Errata | About Us | Linux Info | Search | JumpWords
No Frames | Show Frames

Copyright © 1995-1997 Red Hat Software. Legal notices