jQuery vs Zepto runtime
JavaScript performance comparison
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.
| Test | Ops/sec | |
|---|---|---|
jQuery |
|
pending… |
ZeptoJS |
|
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:
- Revision 1: published by Devin
- Revision 2: published
- Revision 3: published
- Revision 4: published
- Revision 6: published
- Revision 7: published
- Revision 8: published by abernh
0 comments