On Fri, 6 Oct 2000, Walter Banks wrote: > > From: Douglas Wood > > > As to your statement "As an embedded tool, it should be used carefully if > > you intend to compete with assembly coding", I would caution that you'll > > never get C to complete with hand-tooled assembly language code > > without resorting to using questionable tricks with, I think, will end up > > > negating any gains made in creation speed and maintainability. > > If a routine really needs space or speed considerations, just go > > ahead and write it in assembly to begin with. > > At the risk of starting a ASM vs C war again. Most good C compilers can > compete very well with extremely well written hand coded assembler. C > compilers > remember coding requirements of a target processors and instruction side > effects. C compilers can easily port code between processor targets even > processors in the same family, for example between 16C74 and 16F874 where > significant subtle differences exist. Of course I am biased. > > Walter Banks > I thought I was writing tight ASM until I got the CCS compiler. Now if I need the absolute quickest code I look at hand optimizing the C generated assembly. It's also a great way to learn a new processors ASM! -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.