title: Why is headOption faster
body: <p>I made a change to some code and it got 4.5x faster. I'm wondering why. It used to be essentially: </p>
  
  <pre><code>def doThing(queue: Queue[(String, String)]): Queue[(String, String)] = queue match {
    case Queue((thing, stuff), _*) =&gt; doThing(queue.tail)
    case _ =&gt; queue
  }
  </code></pre>
  
  <p>and I changed it to this to get a huge speed boost:</p>
  
  <pre><code>def doThing(queue: Queue[(String, String)]): Queue[(String, String)] = queue.headOption match {
    case Some((thing, stuff)) =&gt; doThing(queue.tail)
    case _ =&gt; queue
  }
  </code></pre>
  
  <p>What does <code>_*</code> do and why is it so expensive compared to headOption?</p>