jquery selector speed (v28)

Revision 28 of this benchmark created by Guhe Louis on


Preparation HTML

<div>
<div class="repo">
<div class="div-cl">
<span class="span-cl-9999"></span>
</div>
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
A
$('.repo .div-cl .span-cl-9999').css("border", "1px solid #000");
ready
B
$('div.repo div.div-cl span.span-cl-9999').css("border", "1px solid #000");
ready
C
$('div.repo div.div-cl span.span-cl-9999').css("border", "1px solid #000");
ready
D
$('.repo .div-cl .span-cl-9999').css("border", "1px solid #000");
ready

Revisions

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