--- Paul Curtis <plc@rowley.co.uk> wrote: > Gcc generates this with -O3, an abomination in my > eyes: Larger numbers behind the -O option do not automatically cause "better" optimization. There is no universal definition for how to get "better" optimized code (It depends on what the application is what is you are trying to accomplish). With regards to optimization. anyway you look at it, it's a speed vs. code size tradeoff. With that said, In the example that you cited, using -O3, gcc attempts to inline all "simple" functions. So, you got what you asked for: A lot of inline functions resulting in large code size. For the AVR target, this normally constitutes a large pessimization due to the code increasement. However, there are exceptions (But, your example is not one of them...). So, to sum up your example, when you used the -O3 switch, you told gcc to include TONS of inline code. gcc did exactly what you asked it to do: increase code size. To check my statements, query the internet for : avr-libc-user-manual and read the section of the manual on: Selected general compiler options Regards Marvin Dickens ===== Registered Linux User No. 80253 If you use linux, get counted at: http://www.linuxcounter.org __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25� http://photos.yahoo.com/ph/print_splash
Message
RE: [AVR-Chat] Re: STK500, STK501 & AVR Studio not a complete environment
2004-04-26 by mpdickens
Attachments
- No local attachments were found for this message.