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
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://underscorejs.org/underscore-min.js"></script>
var ar = [1,2,3,4,5,6,7,8,9,10] ;
function cond(e){return e !== 10}
Array.prototype.filter1 = function(fun /*, thisp */) { "use strict"; if (this == null){throw new TypeError();} var t = Object(this); var len = t.length >>> 0; if (typeof fun != "function"){throw new TypeError();} var res = []; var thisp = arguments[1]; for (var i = 0; i < len; i++) { if (i in t) { var val = t[i]; if (fun.call(thisp, val, i, t)) res.push(val); } } return res; };
Ready to run.
Test | Ops/sec | |
---|---|---|
jQuery |
| ready |
JS |
| ready |
native Array.filter |
| ready |
Underscore filter |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.