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 arr = [];
const arr2 = [];
const arr3 = [];
class BaseObject {
selected = false;
orderProduct = {
code: -1,
ean: "12345",
label: "12345",
line: 1,
quantity: 1,
state: "12345",
transaction: "12345",
availability: "12345",
creation: "12345",
update: "12345",
origin: "12345"
}
constructor(id, selected) {
this.selected = selected;
this.orderProduct.code = id;
}
}
for (let i = 0; i < 100; i++) {
arr.push(new BaseObject(i, i % 2 === 0));
}
for (let i = 0; i < 100; i++) {
arr2.push(new BaseObject(i, i % 3 === 0));
}
Ready to run.
Test | Ops/sec | |
---|---|---|
ForEach |
| ready |
Chaining |
| ready |
Chaining 2 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.