Re: C code .vs. Assembly code for Microcontrollers/DSPs ?

yatesc@csee.usf.edu (Randy Yates)
6 Mar 1996 21:15:07 -0500

          From comp.compilers

Related articles
[6 earlier articles]
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? andrew@memex.co.uk (Andrew Cruickshank) (1996-03-04)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? fink@post.tau.ac.il (1996-03-05)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? torbenm@diku.dk (1996-03-05)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? hatrjo@hat-fi.kone.com (Risto Jokinen) (1996-03-05)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? max@gac.edu (1996-03-06)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? rhn@sgi.com (Ron Nicholson) (1996-03-06)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? yatesc@csee.usf.edu (1996-03-06)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? cdg@nullstone.com (1996-03-07)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? thinklab@earth.usa.net (1996-03-08)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? tchannon@black.demon.co.uk (Tim Channon) (1996-03-08)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? koopman@cs.cmu.edu (1996-03-08)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? hbaker@netcom.com (1996-03-08)
Re: C code .vs. Assembly code for Microcontrollers/DSPs ? mac@coos.dartmouth.edu (1996-03-08)
[37 later articles]
| List of all articles for this month |
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]


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.