jQuery 2.0b VS jQ.Mobi VS zepto VS Angular jqLite (v150)

Revision 150 of this benchmark created by 54yuri on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.min.js">
</script>
<script src="http://zeptojs.com/zepto.min.js">
</script>
<script src="http://cdn.jqmobi.com/jq.mobi.min.js">
</script>
<script src="http://code.jquery.com/jquery-2.0.3.min.js">
</script>
<script src="http://rawgithub.com/01org/appframework/master/appframework.min.js">
</script>
<div id="container">
</div>

Setup

var d = {};
  d.id = function(el) {
    return document.getElementById(el);
  }
  d.create = function(el) {
    return document.createElement(el);
  }
  
  //Lets add the append method to all html dom nodes:
  HTMLElement.prototype.append = function(el) {
    this.appendChild(el);
  }
  var container = d.id('container');
  var ul, li, i = 0;

Teardown



            container.innerHTML = "";
        
  

Test runner

Ready to run.

Testing in
TestOps/sec
Intel App Framework
ul = $("<ul/>");
for (; i < 100; i += 1) {
  li = $("<li>hello world jQuery</li>");
  ul.append(li);
}
$(d.id('container')).append(ul);
ready
Zepto
ul = Zepto("<ul/>");
for (; i < 100; i += 1) {
  li = Zepto("<li>hello world Zepto</li>");
  Zepto(ul).append(li);
}
Zepto(d.id('container')).append(ul);
ready
Angular jqLite
ul = angular.element("<ul/>");
for (; i < 100; i += 1) {
  li = angular.element("<li>hello world Angular</li>");
  ul.append(li);
}
angular.element(d.id('container')).append(ul);
ready
jQuery
ul = jQuery("<ul/>");
for (; i < 100; i += 1) {
  li = jQuery("<li>hello world jQuery</li>");
  ul.append(li);
}
jQuery(d.id('container')).append(ul);
ready
jQ.Mobi
ul = jq("<ul/>");
for (; i < 100; i += 1) {
  li = jq("<li>hello world jq.Mobi</li>");
  ul.append(li);
}
jq(d.id('container')).append(ul);
ready

Revisions

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