The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
From: Spehro Pefhany
Subject: Re: To C or not to C
References: <email@example.com> <firstname.lastname@example.org>
X-Newsreader: Forte Agent 1.92/32.572
Date: Sat, 04 Jan 2003 05:54:31 GMT
NNTP-Posting-Date: Sat, 04 Jan 2003 00:54:31 EST
On Sat, 4 Jan 2003 15:47:08 +1100, the renowned "Michael Culley"
>Price is of high priority. Coding time is less of a priority as the project
>is fairly simple. Size is important as we only have 2 k and might use a
>smaller chip if it will save a few cents.
If you are going to be making tens of thousands+, then assembly may
allow you to fit it into a smaller processor which may indeed save a
few cents and allow higher performance- at the price perhaps of
development time, and probably maintainability. But I suggest real
caution in this way of thinking. Do those few cents really make a
significant difference to your selling price or profit margin?
How much market share will you lose if it takes an extra 4 months
to get to market? Can you start with a bigger chip and port it to
assembly to shrink the size if sales explode (you can always
>Is the ratio of 3:1 for the C to assembler code typical or are we doing
No, maybe. You may just have a crummy compiler or be using it wrong.
Without seeing what you are doing exactly it's hard to tell. C is
weak in dealing with some areas, but you've not mentioned them.
I'd guesstimate 20-30% difference between what a *good* 8051 assembly
programmer can do and what a *good* compiler does when a decent C
programmer uses it, who also takes care on optimization and
understands a bit about the machine. That's more difference than the
biased compiler suppliers (and bad assembly programmers) typically
claim, but as memory often comes in 2:1 leaps that don't add that much
$, not that significant to the bottom line.
"it's the network..." "The Journey is the reward"
email@example.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup