Hello Peter,
When you tell the compiler to optimize for speed, it makes a best effort to
get the best performance, and when you use size optimizations, it still
optimizes the code for performance, but takes code size into account.
The fact you get 10% faster code by choosing size optimization is not really
all that surprising, but you should definitely write to the compiler team,
as it indicates that they can improve their performance optimization
heuristics.
Remember that a C compiler is simply a program that translates the C source
code to machine language. That translation relies on analysis and heuristics
to get the best performance and code size.
The "for speed" and "for size" are simply shortcuts for specific default
heuristics, but compiler have flags that control the heuristics much more
and you can take advantage of those flags to get the most out of your
software.
Check the Metrowerks user manual for compiler flags for more details.
Thanks,
- Shay Gal-On
Dir. Software Engineering, EEMBC
www.eembc.org/contact
--
You received this message because you are subscribed to the Google Groups
"CoreMark" group.
To post to this group, send email to
core...@googlegroups.com.
To unsubscribe from this group, send email to
coremark+u...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/coremark?hl=en.