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
Convert an array to an object. I.e. [1,2,3,4] => {1:'foo', 2:'foo', 3:'foo', 4:'foo'}
<script src="https://unpkg.com/rxjs@7.8.1/dist/bundles/rxjs.umd.min.js"></script>
const items = Array.from({ length: 10_000 }, (_, i) => i)
Ready to run.
Test | Ops/sec | |
---|---|---|
Spread |
| ready |
AssignDirect |
| ready |
AssignObject |
| ready |
FromEntries |
| ready |
ForLoop |
| ready |
ForOfLoop |
| ready |
RxJsReduce |
| ready |
FromEntriesIterator |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.