jQuery vs Zepto runtime

JavaScript performance comparison

Test case created by Devin

Info

jQuery object creation vs ZeptoJS object creation? GO! If the network is not an issue, which is rare, it comes down to the runtime. However, Zepto is certainly better for mobile sites because of it's size.

Preparation code

<div id="main" data-test="the test attribute value"></div><script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script><script src="http://thescoutapp.com/zepto.min.js"></script>
<script>
Benchmark.prototype.setup = function() {
        var d = {};
        d.id = function(el){
            return document.getElementById(el);
        }
        var main = d.id('main');
};
</script>

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
jQuery
jQuery(main)
pending…
ZeptoJS
Zepto(main)
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