jQuery body vs. document.body selector (v26)

Revision 26 of this benchmark created on


Preparation HTML

<script src="https://code.jquery.com/jquery-git2.min.js"></script>

<body id="bodyID"></body>

Test runner

Ready to run.

Testing in
TestOps/sec
$('body')
$('body');
ready
$('html')
$('html');
ready
$(document.body)
$(document.body);
ready
$(window.document.body)
$(window.document.body);
ready
$(window)
$(window);
ready
$("#bodyID")
$("#bodyID");
ready
document.body
document.body
ready
getElementsByTagName
document.getElementsByTagName("body")
ready
getElementById
document.getElementById("bodyID")
ready

Revisions

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