This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Optimization issues

Hi all,

I am working with Infineon XC866 controller.
I am measuring the number of cycles consumed by the keil built in libraries.

To optimize the speed i am selecting Favour speed in the project settings.I have selected the level of optimization as 9.I could not find any improvement in the cycles.

Further there is no improvement in the code size if i give Favour size in the project settings.

Whether anyother settings should be taken care to generate an optimised code by the compiler?

Please help me out

Thanks in advance
Chris

Parents
  • "I am measuring the number of cycles consumed by the keil built in libraries.
    To optimize the speed i am selecting Favour speed in the project settings."


    But the libraries contain code that has already been compiled - unless you obtain the source code and re-build it with these different options, they will make no difference at all to the library code

    Also, if you only have a little, simple code just calling library functions there will not be much to optimise - so optimisation will naturally show little effect!

Reply
  • "I am measuring the number of cycles consumed by the keil built in libraries.
    To optimize the speed i am selecting Favour speed in the project settings."


    But the libraries contain code that has already been compiled - unless you obtain the source code and re-build it with these different options, they will make no difference at all to the library code

    Also, if you only have a little, simple code just calling library functions there will not be much to optimise - so optimisation will naturally show little effect!

Children
  • It would, in a number of cases, be helpful if a compact version of a library was available. For example, memcpy() in the string library is quite a large function optimised for speed. (The same goes for most of the other functions in string.h). However, in an application for which code space is critical a compact version of memcpy() would be very useful.