title: If statement vs if-else statement, which is faster?
body: <p>I argued with a friend the other day about those two snippets. Which is faster and why ?</p>
  
  <pre><code>value = 5;
  if (condition) {
      value = 6;
  }
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>if (condition) {
      value = 6;
  } else {
      value = 5;
  }
  </code></pre>
  
  <p>What if <code>value</code> is a matrix ?</p>
  
  <p>Note: I know that <code>value = condition ? 6 : 5;</code> exists and I expect it to be faster, but it wasn't an option.</p>
  
  <p><strong>Edit</strong> (requested by staff since question is on hold at the moment):</p>
  
  <ul>
  <li>please answer by considering either <em>x86 assembly</em> generated by mainstream compilers (<em>say g++, clang++, vc, mingw</em>) in both optimized and non optimized versions or <em>MIPS assembly</em>.</li>
  <li>when assembly differ, explain why a version is faster and when (<em>e.g. "better because no branching and branching has following issue blahblah"</em>)</li>
  </ul>