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 startDate = new Date('2024-10-01T00:00:00Z');
const endDate = new Date('2024-10-31T00:00:00Z');
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function getSortedMovementList(n) {
const list = [];
for (let i = 0; i < n; i++) {
list.push({
title: 'Pago de servicio',
description: 'Netflix',
amount: getRandomInt(1, 1000),
currency_id: 1,
date: new Date(getRandomInt(startDate.getTime(), endDate.getTime())),
href: '/banking/balance/movements/B1RKFRFOT/detail',
});
}
list.sort((a, b) => b.date.getTime() - a.date.getTime());
return list;
}
const sorted200 = {
list1: getSortedMovementList(200),
list2: getSortedMovementList(200),
list3: getSortedMovementList(200),
}
const sorted450 = {
list1: getSortedMovementList(450),
list2: getSortedMovementList(450),
list3: getSortedMovementList(450),
}
const sorted900 = {
list1: getSortedMovementList(900),
list2: getSortedMovementList(900),
list3: getSortedMovementList(900),
}
const sorted1800 = {
list1: getSortedMovementList(1800),
list2: getSortedMovementList(1800),
list3: getSortedMovementList(1800),
}
const sorted2500 = {
list1: getSortedMovementList(2500),
list2: getSortedMovementList(2500),
list3: getSortedMovementList(2500),
}
const sorted5000 = {
list1: getSortedMovementList(5000),
list2: getSortedMovementList(5000),
list3: getSortedMovementList(5000),
}
const sorted10000 = {
list1: getSortedMovementList(10000),
list2: getSortedMovementList(10000),
list3: getSortedMovementList(10000),
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Sort 200 items per list |
| ready |
Sort 450 items per list |
| ready |
Sort 900 items per list |
| ready |
Sort 1800 items per list |
| ready |
Sort 2500 items per list |
| ready |
Sort 5000 items per list |
| ready |
Sort 10000 items per list |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.