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
var ENTRIES = 5000;
var MAX_TIMER_LENGTH = 2000;
var intervalArray = [];
var timeArray = [];
var x = new Map();
var clearedArray = [];
var average = 0;
for (let val = 0; val < ENTRIES; val++) {
const interval = Math.floor(Math.random() * MAX_TIMER_LENGTH);
timeArray.push(interval);
clearedArray.push(false);
x.set(`key${val}`, {val: interval});
average += interval;
}
console.log('average: ', average/ENTRIES);
Ready to run.
| Test | Ops/sec | |
|---|---|---|
| Multiple | | ready |
| Single | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.