jQuery VS Angular jqLite

JavaScript performance comparison

Revision 182 of this test case created by

Preparation code

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.1/angular.min.js"></script>
<script src="https://code.jquery.com/jquery-git2.min.js"></script>


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

};

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

};
</script>

Preparation code output

<script src="https://code.jquery.com/jquery-git2.min.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>" + msg + "jQuery</li>");
}
jQuery(container).append(ul);
pending…
Angular jqLite
ul = angular.element("<ul>");
for (; i < 100; i++) {
  ul.append(angular.element("<li>" + msg + "Angular</li>"));
}
angular.element(container).append(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