jQuery performance difference without "each"
<p><strong>Update</strong> Added jsfiddle - see bottom of post</p>

<p>I currently have a function that reenables all disabled fields on the screen. While it runs pretty quickly (&lt;1ms according to Firebug profiler), I am in the process of tidying up all the Javascript in my screens and figured this particular function seemed to be a little redundant:</p>

<pre><code>function enableDisabledFields() {
    $('[disabled]').each(function(i) {
        $(this).removeAttr('disabled');
    });
}
</code></pre>

<p>I was under the impression that those 3 lines could be replaced as follows, and I expected if not better than at least <em>equal</em> performance. </p>

<pre><code>function enableDisabledFields() {
    $('[disabled]').removeAttr('disabled');
}
</code></pre>

<p>Apparently I'm wrong. The first performs much better and I don't quite understand why. Even adding additional selectors such as :input make no difference (and in fact make it worse). </p>

<p>Can anyone clear up my confusion? Thanks.</p>

<p><em>Edit</em> I should add that we're using an old version of jQuery - 1.3.1 I believe.</p>

<p><em>Edit2</em> Here are some jsFiddle links. Please keep in mind that I may be misunderstanding Firebug's profiler (<strong>which I'm thinking seems to be the case</strong>).</p>

<p>Option 1: <a href="http://jsfiddle.net/kcut7/" rel="nofollow">http://jsfiddle.net/kcut7/</a></p>

<p>Option 2: <a href="http://jsfiddle.net/ZgZpU/" rel="nofollow">http://jsfiddle.net/ZgZpU/</a></p>
