title: Go switch vs if-else efficiency
body: <p>In Go, <code>switch</code>es are much more flexible than in C (and C++) since they can handle cases of boolean expressions and replace large <code>else</code>-<code>if</code> ladders seemingly entirely, especially with the default <code>switch {...}</code> blocks.</p>
  
  <pre><code>switch {
      case x &lt; 5 &amp;&amp; y &gt; 2:
          //...
      case y == 1 || x &gt; 2:
          //...
      default:
  }
  </code></pre>
  
  <p>Is there any efficiency advantage to using a <code>switch</code> over <code>else</code>-<code>if</code> in Go?  It seems that the boosted efficiency would be lost by the <code>switch</code>'s flexibility.  Is it just up to the compiler to figure it out and see if it can make a jump table?</p>
  
  <p>Is there any performance advantage to using <code>switch</code> over <code>if</code> and <code>else</code>?</p>