On Sat, 02 May 2015 21:06:40 +0200
Clemens Ladisch <clemens(a)ladisch.de> wrote:
Will Godfrey wrote:
If you are using only small values is there
really any benefit in using chars
and shorts rather than just using integers everywhere and letting the compiler
sort it out?
That depends on the CPU architecture.
I thought someone might say that :p
Which is why <stdint.h> defines types like
int16_fast_t.
Also, would bool actually have an extra cost due
to masking needs?
What masking?
Presumably bits have to be masked when being set or read to provide the boolean
action. I wouldn't expect true single bit direct storage to be available.
--
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.