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
arr = [],
obj = {},
obj2 = {},
obj3 = {},
result,
key1 = 510,
key2 = "510",
key3 = "z510",
key4 = "510z";
for (var i = 0; i < 1000; i++) {
arr[i] = i;
obj[String(i)] = i;
obj2["z" + String(i)] = i;
obj3[String(i) + "z"] = i;
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
array int key |
| ready |
array str key |
| ready |
object int key |
| ready |
object string key |
| ready |
object string key 2 |
| ready |
object string key 3 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.