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 is_array(a)
{ try{
if (Array.isArray(a)) return true;
} catch(e){} return false; }
function in_arr(i,kal)
{
if(is_array(i))
{
for(var j=0;j<i.length;j++)
for(var el in kal) if(i[j]===kal[el]) return true;
}
for(var el in kal) if(i===kal[el]) return true;
return false;
}
function original(prop) {
return !in_arr(prop, [
"auth",
"last_sync",
"socket",
"character",
"last_upush",
"push",
"last",
"last_u",
"width",
"height",
"u",
"user",
])
}
function replacement(prop) {
return ![
"auth",
"last_sync",
"socket",
"character",
"last_upush",
"push",
"last",
"last_u",
"width",
"height",
"u",
"user",
].includes(prop)
}Ready to run.
| Test | Ops/sec | |
|---|---|---|
| original | | ready |
| replacement | | ready |
| equality | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.