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 reservedWords = [
'do',
'if',
'in',
'for',
'let',
'new',
'try',
'var',
'case',
'else',
'enum',
'eval',
'false',
'null',
'this',
'true',
'void',
'with',
'break',
'catch',
'class',
'const',
'super',
'throw',
'while',
'yield',
'delete',
'export',
'import',
'public',
'return',
'static',
'switch',
'typeof',
'default',
'extends',
'finally',
'package',
'private',
'continue',
'debugger',
'function',
'arguments',
'interface',
'protected',
'implements',
'instanceof',
'abstract',
'boolean',
'byte',
'char',
'double',
'final',
'float',
'goto',
'int',
'long',
'native',
'short',
'synchronized',
'throws',
'transient',
'volatile',
// special
'as',
'async',
'from',
'get',
'of',
'set',
];
function randomReservedWord() {
return reservedWords[Math.floor(Math.random() * reservedWords.length)];
}
const reservedWordsSet = new Set(reservedWords);
Ready to run.
Test | Ops/sec | |
---|---|---|
.includes |
| ready |
.has |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.