Small slowdown...

Jamie Lokier egcs@tantalophile.demon.co.uk
Tue Mar 30 01:12:00 GMT 1999


>   > Output from the gcc2.7.2 is:
>   > .L11:
>   > 	addl %ecx,%eax
>   > 	leal (%eax,%eax),%ecx
>   > 	decl %edx
>   > 	jns .L11

Jeffrey A Law wrote:
> I just checked this with the current snapshot and the loop looks like
>  this now:
> 
> .L6:
>         addl %edx,%eax
>         leal 0(,%eax,2),%edx
>         decl %ecx
>         jns .L6

There is still room for improvement.

 leal (%eax,%eax),%ecx is 3 bytes long, whereas
 leal 0(,%eax,2) is 5 bytes long

Have nice day,
-- Jamie


More information about the Gcc mailing list