Check if div exists (v10)

Revision 10 of this benchmark created by antonio on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div class="a"></div>

Setup

var a = $('.a');

Test runner

Ready to run.

Testing in
TestOps/sec
.size()
a.size()
ready
querySelector
document.querySelector('.a')
ready
Property Lookup
a[0]
ready
.length
a.length
ready

Revisions

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