Suppose that a while loop in the source code of a program you are writing has the following header:
while ((x && y && z) || (x && y && !z) || (!x && y && z))
but you realized that the above condition is equivalent to simply saying:
while (y && (x || z))
How fast will the 2nd version of this code line run, in terms of the number of operations that we perform, compared to the 1st version?
The 1st conditional performs 2 negations, 6 ANDings, and 2 ORings, which are 10 operations in total. The 2nd conditional performs 1 ORing and 1 ANDing only. So, if all these operation types take the same time to run, the 2nd version is $\frac{10}{2} = 5$ times faster!