title: multiple return statements or a "goto end;"
body: <p>What is better stylewise/readability?</p>
  
  <p>I have a loop that reads input and does different things according to the input, and when an error occurs, I need a simple <code>return;</code>. Example:</p>
  
  <pre><code>while( get_input() )
  {
      if( input == "somethingcool" )
      {
          if( !process_somethingcool() )
              return; // &lt;-- a couple of these
      }
      //...
      else // bad input, error handling is fancier than this, but irrelevant to the question
          return;
  }
  return;
  </code></pre>
  
  <p>So should I replace the individual <code>return;</code>s with a <code>goto end;</code> and place a label <code>end:</code> right above the last return in the example above or not? I am not in need of "use RAII" because nothing is allocated in the <code>if</code> blocks. Both ways would be identical in all senses of the word, except for the style/readability/performance?</p>
  
  <p>I would suppose performance is identical, but just to be sure: is it?</p>