jQ.Mobi

JavaScript performance comparison

Revision 4 of this test case created

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>
<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;
  for (i = 0; i < 100; i++) {
    var li = jq("<li>hello world jq.Mobi</li>");
    ul.append(li);
  }
  con.append(ul);
pending…
jQuery
document.getElementById("container").innerHTML="";


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


  var con = Zepto("#container");
  var ul = Zepto("<ul/>");
  var i;
  for (i = 0; i < 100; i++) {
    var li =Zepto("<li>hello world Zepto</li>");
    ul.append(li);
  }
  con.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. Here’s a list of current revisions for this page:

3 comments

Jesse commented :

Add this to your tests: NoFramework https://gist.github.com/1623509

sdf commented :

dfds

Bjarni commented :

I changed this test slightly, I skipped creating an "object" for the li in the for loop and the results are totally different: http://jsperf.com/revised-jqmobi-performance Then jqMobi performance is about 90% slower and jQuery is much faster.

Add a comment