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 RUNS = 100;
function ttl(obj, ...args) {
return String.raw(obj, ...args);
}
function ttlConcats(obj, ...args) {
let out = '';
const argsLen = args.length;
for (let i = 0; i <= argsLen; i++) {
out += obj[i];
if (i === argsLen) return;
out += args[i];
}
return out;
}
delete runs;
delete ttl;
delete ttlConcats;
Ready to run.
Test | Ops/sec | |
---|---|---|
Template string |
| ready |
TTL - String.raw |
| ready |
TTL - Concats |
| ready |
Template string [NESTED] |
| ready |
TTL - String.raw [NESTED] |
| ready |
TTL - Concats [NESTED] |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.