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
var arr = [];
for (var i = 0; i < 100000; i++) {
arr[i] = i;
}
Array.prototype.mezclar = function() {
var n = this.length;
while (n--) {
var i = Math.floor(n * Math.random());
var tmp = this[i];
this[i] = this[n];
this[n] = tmp;
}
return this;
}
var mezclar2 = function(arr) {
for (var i, tmp, n = arr.length; n; i = Math.floor(Math.random() * n), tmp = arr[--n], arr[n] = arr[i], arr[i] = tmp);
return arr;
}
Array.prototype.mezclar3 = function() {
for (var i, tmp, n = this.length; n--; i = Math.floor(Math.random() * n), tmp = this[i], this[i] = this[n], this[n] = tmp);
return this;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
marlanga |
| ready |
emprear |
| ready |
m+e |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.