title: Performance of jQuery selector with context
body: <p>I was reading this article by Brandon Aaron <a href="http://brandonaaron.net/blog/2009/06/24/understanding-the-context-in-jquery" rel="noreferrer">here</a>, about how jquery context may help. So i thought of doing a test of my own. So this is what I did.</p>
  
  <ol>
  <li><p>Created a DIV with id="context" and nested DIV with id="holder" in "#context" created earlier.</p></li>
  <li><p>Created a nested DIVs of depth 18 and append <code>&lt;div id="context"&gt;&lt;div id="holder"&gt;&lt;/div&gt;&lt;/div&gt;</code> to it resulting in 20 nested DIVs</p></li>
  <li><p>Now I tested time taken to access "#holder" via the following selectors:<br/>
  a. <code>$("#holder")  // no context</code> <br/>
  b. <code>$("#holder", "#context")    // with "#context" selector string</code> <br/>
  c. <code>$("#holder", $("#context"))  // sending jquery object each time with selector "#context"</code> <br/>
  d. <code>$("#holder", $context)    // where, var $context = $("#context"). Caching jquery obj</code> <br/>
  Each of the cases where accessed <code>X = 1000</code> times and start and end time difference was noted. I found that time taken for: <br/>
  case(a) was the least consistent 28-32msec [jquery-1.3.2] <br/>
  case(b)+(c) had the highest times 60-65 msec &amp; 70-75 msec respectively<br/>
  case(d) had 40-50msec with 1 or 2 spiked values. <br/></p></li>
  </ol>
  
  <p>Is this type of basic check valid? You can play with the JS code <a href="http://jsbin.com/aciji4" rel="noreferrer">here</a> at JSBIN.
  [Do let me know If I can improve this test some how] <br/>
  If YES, then how does this 'context' really help?</p>
  
  <p><br/>#NOTE: also replace the jquery-1.3.2 with jquery-1.4.2 in jsbin edit mode and you'll be surprised to see the numbers bump up :P</p>