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 testString1 = "C0001";
var testString2 = "Q0001";
function testMatch(str) {
return str.match(/^C/) !== null;
}
function testCharAt(str) {
return str.charAt(0) === 'C';
}
function testProp(str) {
return str[0] === 'C';
}
function testSubstr(str) {
return str.substr(0,1) === 'C';
}
function testSubstring(str) {
return str.substring(0,1) === 'C';
}
function testSlice(str) {
return str.slice(0,1) === 'C';
}
function testTest(str) {
return /^C/.test(str);
}
Ready to run.
Test | Ops/sec | |
---|---|---|
match |
| ready |
charAt |
| ready |
prop |
| ready |
substr |
| ready |
substring |
| ready |
slice |
| ready |
test |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.