Skip to main content
javida14
Associate III
November 12, 2006
Question

Variable Types

  • November 12, 2006
  • 2 replies
  • 684 views
Posted on November 12, 2006 at 04:59

Variable Types

This topic has been closed for replies.

2 replies

javida14
javida14Author
Associate III
November 10, 2006
Posted on November 10, 2006 at 14:35

Compilers are more efficient if the right type of variables are used. So when a variable is defined should you used

int

unsigned int

or short versions of these?

How would this behave if arm or thumb mode is chosen?

kleshov
Associate
November 12, 2006
Posted on November 12, 2006 at 04:59

For almost all architectures, the type int is the most efficient. This rule works for ARM too. Perhaps, in some cases unsigned int can be more efficient than int, but you'll have to figure it out for yourself. Look at the code the compiler generates. ARM assembly language is not that difficult to learn.

Regards,

- mike