title: What exactly is code branching
body: <p>What is code branching? I've seen it mentioned in various places, especially with bit twiddling, but never really thought about it?</p>
  
  <p>How does it slow a program down and what should I be thinking about while coding?</p>
  
  <p>I see  mention of <code>if</code> statements. I really don't understand how such code can slow down the code. If condition is true do following instructions, otherwise jump to another set of instructions? I see the other thread mentioning "branch prediction", maybe this is where I'm really lost. What is there to predict? The condition is right there and it can only be true or false.</p>
  
  <p>I don't believe this to be a duplicate of <a href="https://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-an-unsorted-array">this related question</a>. The linked thread is talking about "Branch prediction" in reference to an unsorted array. I'm asking what is branching and why prediction is required.</p>