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 str_repeat1(input, multiplier) {
var y = '';
while (true) {
if (multiplier & 1) {
y += input;
}
multiplier >>= 1;
if (multiplier) {
input += input;
} else {
break;
}
}
return y;
}
function str_repeat2(string, multiplier) {
multiplier = parseInt((multiplier === true ? 1 : multiplier) + "", 10);
return typeof string == "string" && multiplier >= 1 ?
new Array(multiplier + 1).join(string) : null;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
kvz (100) |
| ready |
n41tkd (100) |
| ready |
kvz (1000) |
| ready |
n41tkd (1000) |
| ready |
kvz (10000) |
| ready |
n41tkd (10000) |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.