cancel
Showing results for 
Search instead for 
Did you mean: 

Variable Types

javida14
Associate II
Posted on November 12, 2006 at 04:59

Variable Types

2 REPLIES 2
javida14
Associate II
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 II
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