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
Get seems to be more performant in cases smaller than 100 matching 100. But it switches over to Find when matching 100 against 1000
const legends = Array.from({ length: 100 }, (_, i) => ({ name: `legend${i}`, visible: Math.random() < 0.5 }));
// const metaLegends =[ { name: `legend${77}`, visible: Math.random() < 0.5}, { name: `legend${88}`, visible: Math.random() < 0.5}, { name: `legend${99}`, visible: Math.random() < 0.5} ];
const metaLegends = Array.from({ length: 100 }, (_, i) => ({ name: `legend${i}`, visible: Math.random() < 0.5 })).sort(() => Math.random() - 0.5);
const newLegends = [];
Ready to run.
Test | Ops/sec | |
---|---|---|
.find() |
| ready |
.get() |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.