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
const arrayOfItems = new Array(100_000);
function randomizeArrayIds(array) {
for (var i = array.length - 1; i > 0; i--) {
array[i] = { id: Math.floor(Math.random() * 10_000) };
}
}
randomizeArrayIds(arrayOfItems);
const a = new Set(arrayOfItems);
const b = new Set(arrayOfItems);
Ready to run.
| Test | Ops/sec | |
|---|---|---|
| a.size == b.size && a.size == a.union(b).size | | ready |
| a.isSupersetOf(b) && a.isSubsetOf(b) | | ready |
| a.symmetricDifference(b).size == 0 | | ready |
| a.size === b.size && a.isSubsetOf(b) | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.