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>
var Array__slice = [].slice;
function slice1() {
arguments.__proto__ = Array.prototype;
return Array__slice.call(arguments);
}
function slice2() {
var args = [];
var i = arguments.length;
while (i--) args[i] = arguments[i];
return args;
}
function copy(a) {
var args = [];
var i = a.length;
while (i--) args[i] = a[i];
return args;
}
function slice3() {
return copy(arguments);
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
slice1 |
| ready |
slice2 |
| ready |
slice3 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.