Re: What micros do you actually hate to work with?



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
.



Relevant Pages

  • Re: VC++ 7.0 makes programs that run slower than VC++ 6.0
    ... >> you do any insertions/expansion in the vectors, vector assignments, ... >> returning/passing strings and vectors by value. ... I am doing exactly the same thing for both compilers because I am ... > compiling the exact same code. ...
    (microsoft.public.vc.mfc)
  • Re: file copy routine
    ... but in CVF and several other compilers using following syntax: ... You are guaranteed an exact copy with identical #bytes in new file as old ...
    (comp.lang.fortran)
  • Re: file copy routine
    ... You are guaranteed an exact copy with identical #bytes in new file as old ... but until F2003 compilers become more ... times people waste far more time trying devise a "standard conforming" ... solution when a trivial extension such as this will suffice for the ...
    (comp.lang.fortran)
  • Re: VC++ 7.0 makes programs that run slower than VC++ 6.0
    ... >I am compiling the exact the same program with the two different compilers. ... >run a critical real-time function in a loop twenty times. ...
    (microsoft.public.vc.mfc)
  • Re: IEEE support
    ... attempt to define the semantics in detail. ... I suppose the IEEE support could be more useful if examples were available showing how it works with compilers which have implemented it, or how to test whether some of the obscure bits work in an expected way on a given platform. ... For Windows, rounding modes, as well as underflow modes, can be implemented ieee_arithmetic style by use of. ...
    (comp.lang.fortran)