Say I have
If A && B && C ...do something if A = B = C = trueend
Is it faster, however to do:
If ~(A || B || C) ..do something if A or B or C = falseend
I am wondering if the latter statement is faster because it should be able break if any of the conditions are false and not test the rest. But I am wondering if the negation forces all of the conditions to be tested first?
Best Answer