Element-rooted queries

Benchmark created by fat on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li id="fat"><strong>hella</strong></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
rooted
$('#fat').find('strong')
ready
rooted $
$('strong', '#fat')
ready
no root
$('#fat strong')
ready
no id
$('li strong')
ready

Revisions

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