title: $().each vs $.each vs for loop in jQuery?
body: <p>I Can't understand why it is happening.</p>
  
  <p>I read <a href="https://stackoverflow.com/a/2321690/859154">here</a> that  : </p>
  
  <blockquote>
    <p>The first <strong>$.each</strong> constitutes a <strong>single</strong> function call to start the
    iterator.</p>
    
    <p>The second <strong>$(foo.vals).each</strong> makes <strong>three</strong> function calls to start the
    iterator. </p>
    
    <ul>
    <li>The first is to the $() which produces a new jQuery wrapper
    set (Not sure how many other function calls are made during this
    process). </li>
    <li>Then the call to $().each. </li>
    <li>And finally it makes the internal
    call to jQuery.each to start the iterator.</li>
    </ul>
    
    <p>In your example, the difference would be negligible to say the least.
    However, in a nested use scenario, you might find performance becoming
    an issue.</p>
    
    <p>Finally, Cody Lindley in jQuery Enlightenment does not recommend using
    $.each for iterations greater than 1000 because of the function calls
    involved. Use a normal for( var i = 0... loop.</p>
  </blockquote>
  
  <p>So I tested it with this jsperf : </p>
  
  <p><em>(task : find Tr's who has checked checkbox inside of them , and color that tr.)</em></p>
  
  <p>This is the <strong><a href="http://jsbin.com/otecid/2/edit" rel="nofollow noreferrer">jsbin</a></strong> </p>
  
  <p>But look at <strong><a href="http://jsperf.com/asdasda223" rel="nofollow noreferrer">jsperf</a></strong></p>
  
  <p>against all expectations , the <strong>opposite</strong> is the true. ( chrome and FF and IE)</p>
  
  <p><img src="https://i.stack.imgur.com/LgEjG.jpg" alt="enter image description here"></p>
  
  <p>The one who uses <code>$().each</code> ( which calls three methods is the fastest
  and etc..</p>
  
  <p>What is going on here?</p>