----- Original Message -----
From: "yerricde" <d_yerrick@...>
> > Keeping an eye on the assembly output of GCC seems to be the
> > best way of optimising code & learning how to get the compiler
> > to do what you want.
>
> I can attest to that. It's how I (half-)optimized my mixer.
unfortunately, i can sort of agree. this *isn't* how you're supposed
to optimize code, but it seems sometimes you can rearrange the
statements in your inner-loop and have gcc optimize things better or
worse. yuk-- this is what optimizing compilers were *supposed* to
solve.
additionally, if you let gcc generate assembly from your source
('--save-temps'), it seems to be optimizing for some variant of the
arm processor that has some kind of strange pentium-esque instruction
pairing or sequencing. i found the code generated for the arm target,
while not entirely sub-optimal, was very difficult to follow when i
was first learning the ins-and-outs of arm asm.
this may, of course, have changed since the gcc toolchain that i am
using (2.95.2), but i'm not sure. i tried building gcc 3.0-3.2, but
there are very serious errors in the thumb compiler (it using sp as a
base register with offsets in thumb instructions sticks out in my
mind) that i could not work around with any degree of reliability, for
me to consider it a useful upgrade.
bleh,
matthew.