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>
function applier() {
return Array.prototype.slice.call(arguments);
}
function arrayify_slice() {
return Array.prototype.slice.call(arguments);
}
function arrayify_manual() {
var len = arguments.length;
var args = new Array(len);
for(var i = 0; i < len; i++) {
args[i] = arguments[i];
}
return args;
}
function arrayify_concat() {
var args = [].concat(arguments);
var sum = 0;
for(var i = 0; i < 100000; i++) {
sum += i;
}
return args;
}
function arrayify_push() {
var args = [];
args.push.apply(args, arguments);
return args;
}
function arrayify_splice() {
var args = Array.prototype.splice.call(arguments, 0);
return args;
}
function arrayify_apply() {
var args = arguments.length === 1 ? [ arguments[0] ] : Array.apply(null, arguments);
return args;
}
function arrayify_function() {
var args = applier.apply(null, arguments);
return args;
}
function arrayify_slice_apply() {
var args = Array.prototype.slice.apply(arguments);
return args;
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
slice |
| ready |
manual |
| ready |
concat |
| ready |
push |
| ready |
splice |
| ready |
apply |
| ready |
special_function |
| ready |
slice_apply |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.