title: Arithmetic vs boolean operations
body: <p>I've come across this piece of code in some forum:</p>
  
  <p><code>if ( a * b * c * d == 0 ) ....</code></p>
  
  <p>and the owner claims this is a tad faster than</p>
  
  <p><code>if (a == 0 || b == 0 || c == 0 || d == 0)</code></p>
  
  <p>These variables are defined as:</p>
  
  <p><code>int a, b, c, d;</code></p>
  
  <p>And their absolute values are guaranteed to be less than or equal to 100. (So we could ignore the possibility of overflowing)</p>
  
  <p>If we just ignore the <code>readability</code> and just focus on the performance, is the claim really correct?</p>
  
  <p>It seems to me that the second approach might actually be faster since you could take advantage of 'short-circuit' sometimes. But then, what-do-I-know?!</p>