Checking for empty list in Haskell: Is (length list == 0) or (list == []) more efficient?
<p>Say I want to check if a list is empty in a guard in Haskell there are two options:</p>

<ol>
<li><code>length list == 0</code></li>
<li><code>list == []</code></li>
</ol>

<p>Which of these two logical tests are more efficient? I'm inclined to say the empty list test because relies on more basic constructs rather than the prelude function <code>length</code> but I'm not sure.</p>