Bruce Dawson Review
05-Jan-89 13:28:29
Sb: #28221-Bruce Dawson Review
Fm: colin fox 72077,2636
To: Nelson Ingersoll 73230,2116
I didn't mean to imply that you are "… against God, apple pie, and the
girl next door…" because you don't like the idea of an optimizing assembler.
I actually forgot what I said, but I meant no offence. I think I remember
saying that you are SOL if you want to program on the Amiga and have the
assembler you use not change your code one iota.
The thing I think some people are missing here is that the assembler
DOESN'T OPTIMIZE MORE THAN ONE INSTRUCTION AT A TIME!! All this means is that
the assembler goes through your code a line at a time, and sees if it can use a
better instruction, regardless of the previous or next instructions. The only
exception is in the case of the short branch, where it actually looks to see
how far away you are attempting to go.
You are correct- smaller doesn't necessarily mean faster. BUT, when you
are talking about the execution time of one instruction vs the time of a
smaller version of that instruction, smaller DOES mean faster. If you have a
loop that you want to speed up, the fastest way is to unroll it. Your
assembler, however, will _NOT_ look at what you've done and say "gee! That
looks like a lot of instructions that I can do in a loop! I think I'll just
save some code and loop this." That's the job of a high level language. Can you
think of a case where replacing an instruction with a smaller _counterpart_ of
THAT SAME instruction will have an adverse affect?
— Colin —