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
function getRandomDate() {
return new Date(new Date() - Math.random()*(1e+12))
}
function formatDate(date) {
const day = date.getDate().toString().padStart(2, '0');
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const year = date.getFullYear().toString();
return `${day}/${month}/${year}`;
}
function getRamdomDatesArray(arraySize) {
let result = [];
for(let i = 0; i < arraySize; i++ ) { result.push(getRandomDate()) }
return result;
}
const randomDatesArr = getRamdomDatesArray(10000)
Ready to run.
Test | Ops/sec | |
---|---|---|
Transform array elements in sort function |
| ready |
Transform array elements before sort function |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.