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
<script>
var aDictionary = []
aDictionary['a'] = "The string is for case 'a'";
aDictionary['b'] = "The string is for case 'b'";
aDictionary['c'] = "The string is for case 'c'";
aDictionary['d'] = "The string is for case 'd'";
aDictionary['e'] = "The string is for case 'e'";
aDictionary['f'] = "The string is for case 'f'";
aDictionary['g'] = "The string is for case 'g'";
aDictionary['h'] = "The string is for case 'h'";
aDictionary['i'] = "The string is for case 'i'";
aDictionary['j'] = "The string is for case 'j'";
var objDictionary = {
'a' : "The string is for case 'a'",
'b' : "The string is for case 'b'",
'c' : "The string is for case 'c'",
'd' : "The string is for case 'd'",
'e' : "The string is for case 'e'",
'f' : "The string is for case 'f'",
'g' : "The string is for case 'g'",
'h' : "The string is for case 'h'",
'i' : "The string is for case 'i'",
'j' : "The string is for case 'j'"
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Lookup by object |
| ready |
Lookup by switch |
| ready |
Lookup by array |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.