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
In this test, the given array is in a "random" order.
const availableOption = {
name: 'alpha',
choices: [
{
name: 'one',
id: 1,
selected: false,
quantity: 0,
fractionalQuantity: 0,
},
{
name: 'two',
id: 2,
selected: false,
quantity: 0,
fractionalQuantity: 0,
},
{
name: 'three',
id: 3,
selected: false,
quantity: 0,
fractionalQuantity: 0,
},
{
name: 'four',
id: 4,
selected: false,
quantity: 0,
fractionalQuantity: 0,
},
{
name: 'five',
id: 5,
selected: false,
quantity: 0,
fractionalQuantity: 0,
},
{
name: 'six',
id: 6,
selected: false,
quantity: 0,
fractionalQuantity: 0,
},
],
};
const givenOption = {
name: 'beta',
choices: [
{
name: 'three',
id: 3,
selected: false,
quantity: 0,
fractionalQuantity: 0,
},
{
name: 'two',
id: 2,
selected: false,
quantity: 0,
fractionalQuantity: 0,
},
{
name: 'six',
id: 6,
selected: false,
quantity: 0,
fractionalQuantity: 0,
},
{
name: 'one',
id: 1,
selected: false,
quantity: 0,
fractionalQuantity: 0,
},
{
name: 'five',
id: 5,
selected: false,
quantity: 0,
fractionalQuantity: 0,
},
{
name: 'four',
id: 4,
selected: false,
quantity: 0,
fractionalQuantity: 0,
},
],
};
Ready to run.
Test | Ops/sec | |
---|---|---|
splice |
| ready |
conditional unshift |
| ready |
filter |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.