Zepto vs. jQ vs. jQmobi vs. raw

JavaScript performance comparison

Revision 115 of this test case created by realpeterz

Info

Zepto vs. jQuery vs. jQmobi vs. raw JS for getting an element by id (using latest versions, hosted on cl.ly)

Preparation code

<script src="http://zeptojs.com/zepto.min.js"></script>
<script src="https://raw.github.com/01org/appframework/master/jq.mobi.min.js"></script>
<script src="http://code.jquery.com/jquery-2.0.0b2.js"></script>
<script src="https://raw.github.com/zentooo/Riddle.js/develop/src/riddle.min.js"></script>
<script src="https://raw.github.com/dameleon/tt.js/develop/tt.min.js"></script>
<div id="asdf">
</div>
<script>
Benchmark.prototype.setup = function() {
    var body = $(document.body)
};
</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
Zepto
Zepto('#asdf')
pending…
jQuery
jQuery('#asdf')
pending…
jQMobi
jq('#asdf')
pending…
riddle.js
r('#asdf')
pending…
tt.js
tt('#asdf')
pending…
Straight getElementById
document.getElementById('asdf')
pending…
querySelector
document.querySelector('#asdf')
pending…
jQuery: find()
body.find('#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. Here’s a list of current revisions for this page:

0 comments

Add a comment