Data Selector Performance (v40)

Revision 40 of this benchmark created on


Preparation HTML

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

Setup

var i = 500, div = $("#test");
    div.html('');
    while (i--) {
      div.append("<span data-component=\"wc_" + i%50 + " wc_"+ i%50 + "_" + i + "\" class=\"PHS_TERM_123456" + i%2 + "_" + i%50 + " wc_" + i%50 + " wc_"+ i%50 + "_" + i + "\">span " + i.toString() + "</span>");
    }

Teardown


    div.html('');
  

Test runner

Ready to run.

Testing in
TestOps/sec
dataSelector contains
$("[data-component~=\"wc_31\"]")
ready
classSelector
$(".wc_31")
ready

Revisions

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