Zepto vs jQuery 2.x - 2014-08-11 (v11)

Revision 11 of this benchmark created by João Firmino on


Preparation HTML

<div class="container"></div>
<script src="//zeptojs.com/zepto.min.js"></script>
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>

Setup

//Lets add the append method to all html dom nodes:
    HTMLElement.prototype.append = function(el) {
      this.appendChild(el);
    }
    
    var container = document.getElementsByClassName('container')[0];
    var ul, li, i = 0;

Teardown


    container.innerHTML = "";
  

Test runner

Ready to run.

Testing in
TestOps/sec
Zepto
ul = Zepto("<ul/>");
for (; i < 100; i += 1) {
  li = Zepto("<li>hello world</li>");
  ul.append(li);
}
Zepto(".container").append(ul);
ready
jQuery
ul = jQuery("<ul/>");
for (; i < 100; i += 1) {
  li = jQuery("<li>hello world</li>");
  ul.append(li);
}
jQuery(".container").append(ul);
ready

Revisions

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