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 index = 0;
var foo = 0;
var cached = {};
function myFunction0() {
foo++;
}
function myFunction1() {
foo++;
}
function myFunction2() {
foo++;
}
function myFunction3() {
foo++;
}
function myFunction4() {
foo++;
}
function myFunction5() {
foo++;
}
function myFunction6() {
foo++;
}
function myFunction7() {
foo++;
}
function myFunction8() {
foo++;
}
function myFunction9() {
foo++;
}
var cases = [];
cases[0] = myFunction0;
cases[1] = myFunction1;
cases[2] = myFunction2;
cases[3] = myFunction3;
cases[4] = myFunction4;
cases[5] = myFunction5;
cases[6] = myFunction6;
cases[7] = myFunction7;
cases[8] = myFunction8;
cases[9] = myFunction9;
var cases_object = {
'0': myFunction0,
'1': myFunction1,
'2': myFunction2,
'3': myFunction3,
'4': myFunction4,
'5': myFunction5,
'6': myFunction6,
'7': myFunction7,
'8': myFunction8,
'9': myFunction9
};
Ready to run.
Test | Ops/sec | |
---|---|---|
Object hash |
| ready |
Object hash cached |
| ready |
Switch string |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.