jQuery 1.x vs 2.x (v3)

Revision 3 of this benchmark created by m_gol on


Preparation HTML

<script src="https://code.jquery.com/jquery-git1.js">
</script>
<script>
  jQ1 = jQuery.noConflict();
</script>
<script src="https://code.jquery.com/jquery-git2.js">
</script>
<script>
  jQ2 = jQuery.noConflict();
</script>
<div id="wrapper">
</div>

Setup

document.querySelector("#wrapper").innerHTML = '\n\
  <div id="idSelector" style="display: none;">\n\
    <div class="classSelector">\n\
      <div id="find">\n\
        <div id="cssGetter" style="color: black;">\n\
          <div id="cssSetter" style="color: black;">\n\
            <div id="editablearea"></div>\n\
            <ul id="iteration">\n\
              <li>\n\
                <div></div>\n\
              </li>\n\
              <li>\n\
                <p>\n\
              </li>\n\
              <li>\n\
                <input type="checkbox">\n\
              </li>\n\
              <li>\n\
                <h>\n\
                </h>\n\
              </li>\n\
              <li>\n\
                <table>\n\
                  <thead>\n\
                  </thead>\n\
                  <tbody>\n\
                  </tbody>\n\
                </table>\n\
              </li>\n\
              <li>\n\
                <textarea>\n\
                </textarea>\n\
              </li>\n\
              <li>\n\
                <span>\n\
                </span>\n\
              </li>\n\
            </ul>\n\
          </div>\n\
        </div>\n\
        <div>\n\
        </div>\n\
      </div>\n\
    </div>\n\
  </div>\n\
  ';
  
  function testcase(_$) {
    _$("#idSelector table").empty();
  }

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery 1.x
testcase(jQ1);
ready
jQuery 2.x
testcase(jQ2);
ready

Revisions

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