Re: What micros do you actually hate to work with?
- From: Jonathan Kirwan <jkirwan@xxxxxxxxxxxxxx>
- Date: Thu, 12 Oct 2006 08:53:28 GMT
On 12 Oct 2006 08:39:11 GMT, ammonton@xxxxxxxxxxxxxxxxxxxxxxxx wrote:
Jonathan Kirwan <jkirwan@xxxxxxxxxxxxxx> wrote:
I've only had exactly one case in my entire professional life where I
was permitted to implement the exact same application, from top to
bottom, in both assembly and C.
We'd first decided upon the assembly route in the earlier incarnation
because of some tests we did with the earlier C compiler and the very
limited code space we had available to us in the available PICs that
were appropriate to the design. At that time, the PIC18 line of parts
was 'very new' and we still hadn't even been able to get samples. So
there was no way to consider it, seriously. We kept our eye on them,
though.
It would be interesting to know what the results would be *now*. After
all, compilers for brand new chips usually don't produce optimal code.
First off, I don't consider 4 years all that much time. At least in
terms of C compilers. Most of them, where I've bothered looking in
some detail, do little more than compilers did 25 years back. Some of
the time spent in newer verions of the compilers will go into code
generation, I'll grant. But not as much as you might imagine. If it
were otherwise, I'd see a lot more in terms of optimization techniques
than I actually do see. The years would accumulate. But they don't,
not that much. I haven't checked the absolute latest of the Microchip
C compiler for PIC16's, for example, but it probably still uses static
compiler temporaries if I had to guess.
(Decisions made based on outdated information is IMO a big problem with
technical opinions. For instance a lot of the prejudice against C++ is
still based on benchmarks from first-generation compilers from the
1980s. Because it costs time, effort and money the results are rarely
revisited.)
There were (and are) still some good reasons to avoid C++ in _some_
embedded projects. And the semantics of source code (and the
necessarily generated code) isn't nearly as obvious as you may think
it is. However, I also do pretty much subscribe to Stroustrup's
points about holding closely to "zero or low execution time cost"
semantics and a focus much more on compile-time features and less on
run-time ones. So I agree, to a degree. I've given some specific
examples about C++ semantics vs C here in this group a while back. You
can look them up.
....
I'd like to know of other exact equivalent application case studies
from the experiences of others, though. It's rare to get a chance for
such comparisons and I've gotten only one in my life. But maybe there
are some others. And their results will probably be quite different
from my own and interesting in their own rights.
Jon
.
- Follow-Ups:
- Re: What micros do you actually hate to work with?
- From: Wilco Dijkstra
- Re: What micros do you actually hate to work with?
- From: Jonathan Kirwan
- Re: What micros do you actually hate to work with?
- References:
- Re: What micros do you actually hate to work with?
- From: PhilW
- Re: What micros do you actually hate to work with?
- From: Didi
- Re: What micros do you actually hate to work with?
- From: Ulf Samuelsson
- Re: What micros do you actually hate to work with?
- From: Joerg
- Re: What micros do you actually hate to work with?
- From: Frank Bemelman
- Re: What micros do you actually hate to work with?
- From: Joerg
- Re: What micros do you actually hate to work with?
- From: Frank Bemelman
- Re: What micros do you actually hate to work with?
- From: Jim Granville
- Re: What micros do you actually hate to work with?
- From: Frank Bemelman
- Re: What micros do you actually hate to work with?
- From: Jonathan Kirwan
- Re: What micros do you actually hate to work with?
- From: ammonton
- Re: What micros do you actually hate to work with?
- Prev by Date: Re: Interrupt driven UART
- Next by Date: Re: Interrupt driven UART
- Previous by thread: Re: What micros do you actually hate to work with?
- Next by thread: Re: What micros do you actually hate to work with?
- Index(es):
Relevant Pages
|