??? 03/18/05 16:24 Read: times |
#89951 - Asm vs C Responding to: ???'s previous message |
"But since I'm quite a capable 8052 assembly language developer, I am also able to recognize when "reaping the benefits of C" will come at an unacceptable cost in efficiency in terms of what kind of code the 'C' compiler will generate"
Sure, but that's very much the point. Only the bits that are flying close to the bleeding edge need to be written with efficiency as the number one priority, the bulk can and should be written with readibility and maintainability as the top priorities. Those, along with development time, are the advantages of using a high level language. You made it sound as though *all* your 'C' code was written with the resulting assembler in mind. "Sometimes bending the "C rules" allows the compiler to generate much more efficient code." I'm curious as to exactly what you mean by this. Can you give an example? "This comes back to differentiating a typical 'C' programmer from an embedded 'C' programmer. Pretty much any 'C' programmer can write a 'C' program for the 8052--but not all 'C' programmers will be able to write efficient 'C' programs for the 8052." Don't forget that a lot of us 'C' programmers have been at it since the days when efficiency was frequently a consideration on all platforms. Outside of embedded programming I shouldn't think 'C' is taught much these days, C++ is rather more fashionable. While C++ doesn't have to be written in a particularly inefficient manner it certainly can be. The 'C' language was designed with translation to efficient machine language as a high priority. |