First of all, I'm using GCC. So all the questions I'm asking are GCC specific. Please don't complain that you can't ++ with bools, because GCC has that extension.
1. How many bits (read, sizeof() is useless here) does a bool take up?
2. Will x'oring a number with itself or setting it to zero be faster?
3. With bool types, will "++" or "= 1" work faster? Or, is there an even quicker way to set a bool to TRUE?
orCode:if (imn == 4) imn = 2; else imn = 4;
run faster? Thanks.Code:imn -= 2; imn = !imn; imn = 2 * imn + 2;