Zepto vs. jQuery Mobile vs. jQmobi

JavaScript performance comparison

Revision 201 of this test case created by

Preparation code

<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.1.6/zepto.min.js">
</script>
<script src="http://f.cl.ly/items/2e2P0m3d1Q2U3w01230Y/jq.mobi.min.js">
</script>
<script src="https://code.jquery.com/jquery-2.0.0.min.js"></script>
<script src="https://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js">
</script>
<div id="asdf">
</div>
      
<script>
Benchmark.prototype.setup = function() {
  function el(string) {
    if (string.indexOf('#') === 0) {
      return document.getElementById(string.substr(1, string.length));
    }
  }
  
  //to be fair, I'll wrap getElementById in a function and return the object
  
  function byId(id) {
    return document.getElementById(id);
  }
  
  var boolean = true;

};
</script>

Preparation code output

<script src="http://f.cl.ly/items/2e2P0m3d1Q2U3w01230Y/jq.mobi.min.js"> </script> <script src="https://code.jquery.com/jquery-2.0.0.min.js"></script> <script src="https://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"> </script> <div id="asdf"> </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
Zepto
Zepto('#asdf')
pending…
jQuery Mobile
jQuery('#asdf')
pending…
jQMobi
jq('#asdf')
pending…
el
el('#asdf')
pending…
byId
byId('#asdf')
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