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="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
var dr = {};
dr.utility = {};
dr.utility.hasEvery = typeof Array.prototype.every !== 'undefined';
dr.utility.hasSome = typeof Array.prototype.some !== 'undefined';
dr.utility.any = function (arr, fn) { return $.inArray(true, $.map(arr, fn)) > 0; };
dr.utility.anySome = function (arr, fn) { return $.isArray(arr) && dr.utility.hasSome ? arr.some(fn) : dr.utility.any(arr, fn); };
dr.utility.all = function (arr, fn) { return $.inArray(false, $.map(arr, fn)) > 0; };
dr.utility.allEvery = function (arr, fn) { return $.isArray(arr) && dr.utility.hasEvery ? arr.every(fn) : dr.utility.all(arr, fn); };
var isGreaterThanOne = function (value) { return value > 1; };
var testArray = [];
for (var i = 0; i < 10000; i++) {
testArray.push(Math.random() * (Math.random() + 1));
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
All |
| ready |
Every |
| ready |
Any |
| ready |
Some |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.