jQuery body vs. document selector (v10)

Revision 10 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
$('body').attr('id', 'all-the-things');
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
$('body')
$('body');
ready
$(document)
$(document);
ready
$(document.body)
$(document.body);
ready
$('#all-the-things')
$('#all-the-things');
ready

Revisions

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