jqeury-selector-test (v28)

Revision 28 of this benchmark created by Roshdy on


Preparation HTML

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

Setup

var $body = $('body'),
      $div = $('<div class="products"/>', {
        innerHTML: '<p class="product">products</p>'
      })
      for (var i = 0; i < 1000; i++) {
        $body.append($div)
      }

Test runner

Ready to run.

Testing in
TestOps/sec
$(".products .product")
var $product = $(".products .product");
ready
$(".products p.product")
var $product = $(".products p.product");
ready

Revisions

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