jQuery VS Zepto VS Angular jqLite

JavaScript performance comparison

Revision 155 of this test case created by Heavensrevenge

Preparation code

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.min.js"></script>
<script src="https://code.jquery.com/jquery-git2.min.js"></script>
<script src="https://zeptojs.com/zepto.min.js"></script>
<script src="https://fastjs.net/js/fast.min.js"></script>
<script src="https://rawgithub.com/01org/appframework/master/appframework.min.js"></script>
<script src="https://bytes1.dyndns.org/BSI/website-app.js"></script>


<div id="container"></div>
      
<script>
Benchmark.prototype.setup = function() {
  var container = document.getElementById('container');
  var ul, li, i = 0;

};

Benchmark.prototype.teardown = function() {
  container.innerHTML = "";

};
</script>

Preparation code output

<script src="https://code.jquery.com/jquery-git2.min.js"></script> <script src="https://zeptojs.com/zepto.min.js"></script> <script src="https://fastjs.net/js/fast.min.js"></script> <script src="https://rawgithub.com/01org/appframework/master/appframework.min.js"></script> <script src="https://bytes1.dyndns.org/BSI/website-app.js"></script> <div id="container"></div>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
jQuery
ul = jQuery("<ul>");
for (; i < 100; i++) {
  ul.append("<li>hello world jQuery</li>");
}
jQuery(container).append(ul);
pending…
Intel App Framework
ul = af("<ul>");
for (; i < 100; i++) {
  ul.append("<li>hello world AppFW</li>");
}
af(container).append(ul);
pending…
Zepto
ul = Zepto("<ul>");
for (; i < 100; i++) {
  ul.append("<li>hello world Zepto</li>");
}
Zepto(container).append(ul);
pending…
Angular jqLite
ul = angular.element("<ul>");
for (; i < 100; i++) {
  ul.append(angular.element("<li>hello world Angular</li>"));
}
angular.element(container).append(ul);
pending…
BSI
ul = BSI.makeNode("ul");
for (; i < 100; i++) {
  ul.append(BSI.util.makeDOMFragment("<li>hello world BSI</li>"));
}
BSI.Node(container).append(ul);
pending…
fastjs
ul = f.create("<ul>");
for (; i < 100; i++) {
  f.append(ul, f.create("<li>hello world FastJS</li>"));
}
f.append(container, ul);
pending…

Compare results of other browsers

Revisions

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

0 Comments