jQuery 1.9.1 vs 2.0.0 beta vs 2.0.0 release (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script src="//code.jquery.com/jquery-1.9.1.min.js">
</script>
<script>
  jQ19 = jQuery.noConflict();
</script>
<script src="//code.jquery.com/jquery-2.0.0b1.min.js">
</script>
<script>
  jQ20b = jQuery.noConflict();
</script>
<script src="//code.jquery.com/jquery-2.0.0.min.js">
</script>
<script>
  jQ20r = jQuery.noConflict();
</script>
<div id="idSelector" style='display:none;'>
  <div class="classSelector">
    <div id="find">
      <div id="cssGetter" style="color: black;">
        <div id="cssSetter" style="color: black;">
          <ul id="iteration">
            <li>
              <div id='editablearea'>
              </div>
            </li>
            <li>
              <p>
            </li>
            <li>
              <input>
            </li>
            <li>
              <h>
              </h>
            </li>
            <li>
              <table>
                <thead>
                </thead>
                <tbody>
                </tbody>
              </table>
            </li>
            <li>
              <textarea>
              </textarea>
            </li>
            <li>
              <span>
              </span>
            </li>
          </ul>
        </div>
      </div>
      <div>
      </div>
    </div>
  </div>
</div>

Setup

function testcase(_$) {
      var ti = _$("#iteration").clone().toString();
      var j = 0;
      _$("#iteration li").each(function(i, e) {
        j += e;
        _$("#idSelector").find("table").append('<tr></tr>')
      });
      _$(".classSelector").toggleClass('test');
      _$("#idSelector").find("table").empty();
      _$("#editablearea").text(ti).html(ti).empty();
      _$("#cssGetter").css("color");
      _$("#cssSetter").css("color", "green").css("color", "red");
      _$("#idSelector").find("#someID").end().find(".someClass").end().find("#iteration li").filter(":first").next().parent().filter(":last").prev();
    };

Test runner

Ready to run.

Testing in
TestOps/sec
1.9.1
testcase(jQ19);
ready
2.0.0 beta
testcase(jQ20b);
ready
2.0.0 release
testcase(jQ20r);
ready

Revisions

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