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
Looking at the perf of arrays<->kv pairs
<script>
kvp = {};
arr = [];
kvp['1'] = 'Hello, world!';
kvp['2'] = 'Lorem ipsum dolor sit amet';
kvp['3'] = 'Some random text';
kvp['4'] = 'Blah blah blah';
kvp['5'] = 'Meh :P';
arr[1] = 'Hello, world!';
arr[2] = 'Lorem ipsum dolor sit amet';
arr[3] = 'Some random text';
arr[4] = 'Blah blah blah';
arr[5] = 'Meh :P';
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
for in obj |
| ready |
for in arr |
| ready |
lookup in obj |
| ready |
lookup in arr |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.