I was just writing a few conditional variables, and figured it would be easier to set a value to the result of the equality between 2 boolean values.
What would be faster/more efficient from a processing side, obviously this is marginal?
bool output = true&true;
bool output = true&&true;
In your hypothetical example I doubt very much that it matters as evaluating
true is crazy fast (if not compiled away completely)
Take this example however:
bool output = veryLongFunction() & otherVeryLongFunction();
bool output = veryLongFunction() && otherVeryLongFunction();
In this case the double && short circuits the expression if the first evaluates to false and is thus faster than using just one &.