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 type="module">
const { faker } = await import('https://esm.sh/@faker-js/faker');
window.faker = faker;
</script>
// Generate a Set with random length and values
const arr = new Set(Array.from({ length: Math.floor(Math.random() * 100) }).map(() =>
faker.helpers.arrayElement([
() => faker.word.sample(),
() => faker.number.int(),
() => faker.number.float(),
() => faker.number.bigInt(),
() => faker.helpers.arrayElement([false, true]),
])(),
));
Ready to run.
Test | Ops/sec | |
---|---|---|
Array.from |
| ready |
Set#values().toArray() |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.