32 bit or 8 bit variables

On x86 32 bit architecture there was a speed penalty for accessing non DWORD aligned memory locations and non 32 bit integers etc.

Anyone know if this is the same on the Due? I'm assuming it would be.

As an example if I have a function and pass 4 8 byte integers, then internally it has to load each of these 8 bit numbers and convert to 32 bit for parameter passing.... (ie pushing onto the stack)

The the actual function would treat these 32 bit numbers as 8.

I'm also assuming a 32 bit machine would prefer 32 bit integers as counters.

If so... I want to adjust my code so some specific variables are uint8_t/uint32_t and int8_t/int32_t depending on whether target device is 8 or 32 bit.

I'm also assuming the saving of 3 bytes would be gobbled up on the extra overhead to convert 8<->32 during any parameter passing.

Cortex M chips support unaligned accesses. I really wouldn't worry about it.

Only some instructions support unaligned access so it depends what the C compiler generates.