Re:Dangerous Embedded C Coding Standard Rules (2011)
by alecrn on Monday December 30, 2013 @04:16PM
(#6987012)
For this case, the "fast" int types are provided, eg. uint_fast8_t is the fastest unsigned integer which can hold at least 8 bits; uint8_t is required to have exactly 8 bits.
http://pubs.opengroup.org/onlinepubs/7999959899/basedefs/std...
I'm not an authority on this topic, so I don't want you to take away the message "always use the machine word size". What I do want you to take away is that there are many cases where an "obvious" optimization is counterproductive in practice. Always start with simple, working code, and never optimize without benchmarking.