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
const lowest = 'Z';
const highest = 'AAAAAAAAAA';
function s2bigint(str, radix, charset) {
let result = 0n;
for (let i = 0; i < str.length; i++) {
result += BigInt(charset.indexOf(str[i])) * radix ** BigInt(str.length -i - 1);
}
return result;
}
const strConverter = (str) => s2bigint(str, 26n, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
Ready to run.
| Test | Ops/sec | |
|---|---|---|
| With trim | | ready |
| With base conversion | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.