[Coco] Re: Possible OS-9 Project
James Dessart
james at skwirl.ca
Sat Oct 18 17:22:00 EDT 2003
On Saturday, October 18, 2003, at 04:40 PM, James Ross wrote:
>> It currently is a rare assembly language programmer that can really do
>> better than the optimizer on a good C compiler.
>
> I have seen this argument discussed to to nth degree on the ASM
> newsgroups. In my opinion, there is no compiler than can beat hand
> assembly. However, I can be wrong. I was wrong once, the time I
> discovered I was mistaken about being wrong! :)
With modern, super-scalar processors, a human CAN produce better code
than an optimizing compiler, HOWEVER, it takes a lot of extra work.
The general rule is: don't optimize before it works. Once it works,
you profile the code, see where it spends most of its time, and
optimize that small part. Because a lot of the time, the optimizations
you make, without knowing what gets used the most, are not very useful,
and make the code harder to maintain.
I didn't get my B.Comp.Sci. for nothing. ;)
James
More information about the Coco
mailing list