From: | yatesc@csee.usf.edu (Randy Yates) |
Newsgroups: | comp.compilers,comp.dsp |
Date: | 6 Mar 1996 21:15:07 -0500 |
Organization: | University of South Florida |
References: | 96-03-006 96-03-025 |
Keywords: | optimize, code |
dstarr@pop-3.std.com says...
> For ordinary micro controllers (6805, z80, 8051 etc) a good C
>compiler will do code tight enough for production work. It will do
>better code than 9 out of 10 programmers can do, and the gains in
>speed of development and ease of maintainance make compiler use a
>sound decision. I would certainly question the competance of an
>organization that started a serious product using assembler on a
>ordinary micro now aday's.
I don't agree that compilers can do "better code" than 9/10
programmers if "better code" = "faster code". Consider an interrupt
function. The C compiler is going to push all the registers on the
stack, whereas a careful programmer can be very tricky about stack
pushes and pops in order to minimize them.
However, in general, I do agree with your statement, since I believe
that most of the time the increase in execution speed and/or decrease
in code size is either irrelevent to the task at hand or
insignificant.
--
% Randy Yates
% EE/Mathematics Student
% University of South Florida
% <yatesc@csee.usf.edu>
[On small kernels, a skilled assembler programmer can certainly do better.
On large programs, I'm not so sure. Compilers don't get bored as easily
as we do, so they avoid making dumb mistakes. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.