div.example vs .example

Benchmark created by Daan Verberne on


Description

I want to check if div.example faster is than .example

Preparation HTML

<div class="example">
  <p>
    blablablabla
  </p>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
div.example
$(document).ready(function(){
$("div.example").fadeOut();
});
ready
.example
$(document).ready(function(){
$(".example").fadeOut();
});
ready

Revisions

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

  • Revision 1: published by Daan Verberne on