selector test (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div id="bob">
  <a href="#">A</a>
  <a href="#">B</a>
  <a href="#">C</a>
  <a href="#">D</a>
  <a href="#">E</a>
</div>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>
<p>
  other html here
</p>

    < script type = "text/javascript" > $(document).ready(function() {
      $("#featured > ul").tabs({
        fx: {
          opacity: "toggle"
        }
      }).tabs("rotate", 50000000, false);
    }); < /script>
  };
</script>

Setup

Benchmark.prototype.setup = function() {
    < script type = "text/javascript"
    src = "https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" > < /script>
    <script type="text/javascript" src="
    https: //ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" >

Test runner

Ready to run.

Testing in
TestOps/sec
element test
$('a').css('color', 'red');
ready
id test
$('#bob a').css('color', 'red');
ready
find test
$('#bob').find('a').css('color', 'red');
ready

Revisions

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