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 data = {key: 'test 4'};
data[12] = 'test 1';
data[13] = 'test 2';
data[14] = 'test 3';
var array_large = [];
for (var i = 0; i < 5e5; i++)
array_large[~~(Math.random() * 1e6)] = i;
</script>Ready to run.
| Test | Ops/sec | |
|---|---|---|
| "key" in obj | | ready |
| obj["key"] != undefined | | ready |
| array[key] | | ready |
| key in array | | ready |
| array[key] !== undefined | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.