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

Code Size and Speed

Note: This was originally posted on 14th June 2013 at http://forums.arm.com

I have inherated some ARM Code that I need to tidy up.

Keil uVision4 RealView compiler.

This Code is full of Variables of type "short"  non of them need to be signed.

Would it reduce size and increase speed if i converted everything to "unsigned short" ??

From my 8051 days I would say def yes.
Parents
  • Note: This was originally posted on 14th June 2013 at http://forums.arm.com


    I would go further (if you can) and convert them to "unsigned int".  Most the data processing instructions work on 32-bit quantities.  If you have sub-word variables you sometimes get additional code from the compiler to convert the result back the smaller format.


    Thanks... does this still apply in Thumb mode??
Reply
  • Note: This was originally posted on 14th June 2013 at http://forums.arm.com


    I would go further (if you can) and convert them to "unsigned int".  Most the data processing instructions work on 32-bit quantities.  If you have sub-word variables you sometimes get additional code from the compiler to convert the result back the smaller format.


    Thanks... does this still apply in Thumb mode??
Children
No data