title: C++ switch statement evaluation
body: <p>Assume we have a following code:</p>
  
  <pre><code>switch (currentChar) {
      case 'G':
      case 'T':                   
      case 'M':
      case ';':                       
      case '\r':                      
      case '\n':  
          doSomething();      
          break;
  }
  </code></pre>
  
  <p>If the first condition is met (<code>currentChar == 'G'</code>) are the following cases also compared, or the program jumps straight to <code>doSomething()</code>?</p>
  
  <p>What would be faster to execute: the switch-case, or an if with <code>||</code> operator?</p>
  
  <p><strong>Clarification:</strong>
  I want <code>doSomething</code> to be executed if any of the conditions is met. I also know that the 'G' case will occur in some 99% of all cases. Can I assume that it will be compared as the first if I put it on top of the list?</p>