'body' vs document.body (v10)

Revision 10 of this benchmark created on


Description

Which is quicker with jQuery? Binding to document.body or 'body' ?

Preparation HTML

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

<span class="clickable">hey</span>

Test runner

Ready to run.

Testing in
TestOps/sec
document.body
$(document.body).on('click', '.clickable', function(e) {});
$('.clickable').click();
ready
'body'
$('body').on('click', '.clickable', function(e) {});
$('.clickable').click();
ready

Revisions

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