title: Evaluating every conditional statement on an if... else if... block
body: <p>Does Objective-C evaluate every statement on an <code>if... else if...</code> block or does it evaluate each as it comes to them and then skip the remaining evaluations if a true condition has been found?</p>
  
  <p>This is more of a pragmatic question related to performance than anything else.</p>
  
  <p>And yes I do know that the content of the if block itself isn't executed, but I am referring to the actual statements that get evaluated.</p>
  
  <p>Example</p>
  
  <pre><code>if ([condition A] == test) {
    // Do something
  } else if ([condition B] == test) {
    // Do something    
  } else if ([condition C] == test) {
    // Do something    
  } else {
    // Do something because all other tests failed
  }    
  </code></pre>
  
  <p>So... if condition A is true, do conditions B and C get evaluated anyway?</p>
  
  <p>If they do, then does using a switch statement perform the same way or does a switch only test each condition as it comes to it and then exits the evaluation because of the break?</p>
  
  <p>My understanding is that on an <code>if... else if...</code> block, every condition is evaluated and therefore using a switch or nested if's (ugh - don't relish the thought there) might be faster on big evaluation operations on a lot of data (hundreds of thousands of items being checked against potentially a hundred statements).</p>
  
  <p>Just curious :-)</p>