On Thu, 2005-08-18 at 08:33 +1000, Don Ingram wrote: > Also, code efficiency and optimization differ between compilers. An > Atmel FAE told me that most folks say that GCC-AVR is almost as good > as IAR (who is the best currently). > This was what I was lead to believe too, but an example shown here a > few weeks ago dispelled that myth. If I recall correctly ( & I may > not ;-) the particular example was the overhead in entering / exiting > an interrupt ( fading memory.)... The particular example compared the > overhead between GCC & CVAVR, the difference was substantial. Someone > more knowledgeable may wish to clarify this. On this specific issue I cannot comment, but I can say that avr-gcc is quite inefficient in its handling of variables. Every time the compiler references the value of an identifier, it loads it into r24,r25 (for a 16 bit int), then transfers it to another register pair before mainpulation of the value. Wastes execution time as well as memory space for unnecessary instructions. The only rationale I can see for this is that it substantially eases the job of the people writing the code generator portion of the project. I suppose, if I were really worried about it, instead of complaining, I'd break out the source code, analyze what they have, and rewrite it to do things correctly, and then submit it for inclusion on the project, eh? *grin* Tom
Message
Re: [AVR-Chat] Differences between C compilers
2005-08-17 by Thomas Keller
Attachments
- No local attachments were found for this message.