jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
Zepto vs. jQuery vs. jQmobi vs. raw JS for getting an element by id (using latest versions, hosted on cl.ly)
<script src="http://f.cl.ly/items/0t3w1Z2R2L2s0J2D2Q2q/zepto.min.js">
</script>
<script src="http://f.cl.ly/items/2e2P0m3d1Q2U3w01230Y/jq.mobi.min.js">
</script>
<script src="http://f.cl.ly/items/3J2O1D3d0I3a0P2e2V1c/jquery-1.7.2.min.js">
</script>
<script src="http://xuijs.com/downloads/xui-2.3.2.min.js">
</script>
<script src="http://jsrun.it/damele0n/tuMO/js">
</script>
<script src="http://jsrun.it/damele0n/tQkX/js"></script>
<script src="http://henriknorberg.net/build.js"></script>
<div id="asdf">
</div>
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;
Ready to run.
Test | Ops/sec | |
---|---|---|
Zepto |
| ready |
jQuery |
| ready |
jQMobi |
| ready |
Raw/baseline |
| ready |
Wrapped Raw |
| ready |
Straight getElementById |
| ready |
XUI |
| ready |
querySelector |
| ready |
Riddle.js |
| ready |
kQuery |
| ready |
Compoent DOM |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.