some jquery selectors performance tests (v29)

Revision 29 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<div id="a">
<div> 
<div>    
<div>   
<p>
</p>
<p>
</p>
</div>    
</div>
</div>    
</div>

<script>
  $a_div = $('#a');
  a_div = document.getElementById('a');
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
$('#a p')
$('#a p')
ready
$('p', $a_div)
$('p', $a_div)
 
ready
$a_div.find('p')
$a_div.find('p')
 
ready
$('p', a_div) CTX
$('p', a_div)
ready
$(a_div).find('p') CTX
$(a_div).find('p')
 
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.