jQ.Mobi

JavaScript performance comparison

Revision 18 of this test case created by David Kaneda

Info

Just a quick check to see the comparison in a more comparable state. The Sencha code was using arrays and createChild, so I recreated a similar setup in the other tests.

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script src="//staging-ian.appmobi.com/game/jq.mobi.min.js">
</script>
<script src="//staging-ian.appmobi.com/game/zepto.min.js">
</script>
<script src="//dev.sencha.com/deploy/touch/sencha-touch.js">
</script>
<div id="container">
</div>

Preparation code output

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
jQ.Mobi
document.getElementById("container").innerHTML = "";
$ = jq;

var con = jq("#container");
var ul = jq("<ul/>");
var i;
var items = [];
for (i = 0; i < 100; i++) {
  var li = "<li>hello world jq.Mobi</li>";
  items.push(li);
}
con.append(ul.html(items.join('')));
pending…
jQuery
document.getElementById("container").innerHTML = "";

var con = jQuery("#container");
var ul = jQuery("<ul/>");
var i;
var items = [];
for (i = 0; i < 100; i++) {
  var li = "<li>hello world jQuery</li>";
  items.push(li);
}
con.append(ul.html(items.join('')));
pending…
Zepto
document.getElementById("container").innerHTML="";
var con = Zepto("#container");
var ul = Zepto("<ul/>");
var i;
var items = [];
for (i = 0; i < 100; i++) {
    var li = "<li>hello world Zepto</li>";
    items.push(li)
}
con.append(ul.html(items.join('')));
pending…
Sencha
document.getElementById("container").innerHTML = "";


var con = Ext.get("container");
var ul = {
  tag: 'ul',
  cn: []
};

var i;
for (i = 0; i < 100; i++) {
  ul.cn.push({
    tag: 'li',
    html: "hello world Sencha FTW"
  });
}

con.createChild(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. Here’s a list of current revisions for this page:

0 comments

Add a comment