Subject: Re: shocking speed performance!
To: None <kim@pvv.ntnu.no>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm32
Date: 05/20/1999 09:44:13
> > My question was not intended to attack the operating system,
> > but rather to try and find where I was going wrong - I'll
> > let you all know when I find the problem.
> 
> You may do what I did:
> Compile to assembler source code, and then examine it.
> If you find stuff like: 
> a <- b * c
> a <- a + d
> 
> Then you have bad code.

Yes you have, the compiler would use mla!

> Fast code should look something like:
> a <- b * c
> e <- Array[x]
> a <- a + d

Bollocks.  you should get

  e = Array[x]
  a = b * c + d

There's no interleaving in this case.

As for fixing it, I've never seen any patches from you, only complaints.  
If you think your so good, why don't you get down off your high horse and 
contribute, then we might all benefit from your obvious wisdom.

As for strongarm tuning.  A lot of tweeks have been put into the upcoming 
egcs-1.2 releases, but you have to remember to tell the compiler what type 
of cpu you have or it will try to generate a generic tune that isn't too 
bad for any CPU.

Don't forget that early ARMs don't have any delay slots, so rearranging 
code can make things worse due to increased register pressure.