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/ext-core/3/ext-core.js">
</script>
var string1 = 'aasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdaadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewezxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjikhgfdsadzxcbvnbmhjjaasdasdasdasdaqweewewtrdtghjik1';
var array1 = string1.split("");
var target = [];
var callback = function(item, index, array) {
this.push(index);
if (item == "1") {
return false;
}
return true;
}
var Arrays = {
forEach: (function() {
if (Array.prototype.every) {
return function(array, fn, scope) {
array.every(fn, scope);
};
} else {
return function(array, fn, scope) {
array = array || [];
var len = array.length >>> 0;
var i = 0;
if (len) {
do {
if (!fn.call(scope || array[i], array[i], i++, array)) {
return false;
};
} while (--len)
}
};
}
}()),
bitwiseLoop: function(array, fn, scope) {
array = array || [];
var length = array.length;
var mod = length & 3;
var times = length >> 2;
var i = 0;
if (times) {
do {
if (!fn.call(scope || array[i], array[i], i++, array)) {
return false;
};
if (!fn.call(scope || array[i], array[i], i++, array)) {
return false;
};
if (!fn.call(scope || array[i], array[i], i++, array)) {
return false;
};
if (!fn.call(scope || array[i], array[i], i++, array)) {
return false;
};
} while (--times);
}
while (mod--) {
if (!fn.call(scope || array[i], array[i], i++, array)) {
return false;
};
}
}
}
target = [];
Ready to run.
Test | Ops/sec | |
---|---|---|
forEach |
| ready |
Arrays.bitwiseLoop |
| ready |
Ext.each |
| ready |
For |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.