jquery selector speed

Benchmark created on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
simple
var t = $('div p a span');
ready
complex
var t = $('div').find('p').find('a').find('span');
ready

Revisions

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