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
function Target() {
}
function invokeTarget(args) {
switch (args.length) {
case 0: Target();
case 1: Target(args[0]);
case 2: Target(args[0], args[1]);
case 3: Target(args[0], args[1], args[2]);
case 4: Target(args[0], args[1], args[2], args[3]);
case 5: Target(args[0], args[1], args[2], args[3], args[4]);
}
}
function invokeTarget2(args) {
if (0 === args.length) { Target(); }
else if (1 === args.length) { Target(args[0]); }
else if (2 === args.length) { Target(args[0], args[1]); }
else if (3 === args.length) { Target(args[0], args[1], args[2]); }
else if (4 === args.length) { Target(args[0], args[1], args[2], args[3]); }
else if (5 === args.length) { Target(args[0], args[1], args[2], args[3], args[4]); }
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Call |
| ready |
Apply |
| ready |
Normal invocation |
| ready |
Indirection |
| ready |
Indirection 2 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.