gcc-2.7 creates faster code than pgcc-1.1.1

Alfred Perlstein bright@cygnus.rush.net
Fri Mar 5 09:22:00 GMT 1999


On Fri, 5 Mar 1999, [koi8-r] ôÅÒÅÈÉÎ ÷ÑÞÅÓÌÁ× wrote:

> >Hi,
> >
> >It seems that "movzb? %al,%?ax" may be faster than "and? $255,%?ax".
> >This patch for egcs 1.1.2 seems to make gzip faster.
> >
> >Thanks.
> >
> >
> 
> 
> Yes it maybe, but not allways, this is not the case as you can see from my
> message:
> Decompression becomes faster, while compression becomes slower.
> 
> More over this generally slow down code. I do have my own patch to egcs
> doing
> the same thing as yours. To turn on suppressing of andl in favor of movz of
> use -mextendz-with-movz.
> Compiling of several programms shows general slow down.
> 
> I any way "movzb? %al,%?ax" and "and? $255,%?ax" takes 1 tick both.
> So this is a kind of mistery with this instructions.

I think the magic lies in that with register renaming, instruction
caches and all the 'behind the scenes' optimizations PPro and later
versions of x86 chips can do.  It really should be investigated more.

Stalling any one of thses features can kill performance, any ideas
on what's feature could be hit by this in gzip, but at the same time
cause bad bahavior in other applications?

-Alfred

> 
> As you can see from my message this change in uncompression code
> yields 20% performance boost. At the same time all the loop dealing with crc
> is
> 0x15 bytes long and takes 50% of time. The one instruction from it 5 or 3
> bytes long
> saves 20% total time or 40% of loop time. This can not be at all. But it is.
> 
> Sincerely Yours, Eugene.
> 



More information about the Gcc mailing list