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
Separately test the 2 changes made in joyent/node@91f1b250ecb4fb8151cd17423dd4460652d0ce97
<script>
function f() {
var args = Array.prototype.slice.call(arguments, 1);
return args;
}
function ff(type) {
var args = Array.prototype.slice.call(arguments, 1);
return args;
}
function g() {
var l = arguments.length;
var args = new Array(l - 1);
for (var i = 1; i < l; i++) args[i - 1] = arguments[i];
return args;
}
function gg(type) {
var l = arguments.length;
var args = new Array(l - 1);
for (var i = 1; i < l; i++) args[i - 1] = arguments[i];
return args;
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Argument.prototype.slice |
| ready |
loop through arguments and copy to args |
| ready |
Argument.prototype.slice with named argument |
| ready |
loop through arguments and copy to args with named argument |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.