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
class Plane {
constructor() {
this.element = document.createElement('div');
this.id = Math.random();
document.body.appendChild(this.element);
this.element.addEventListener('click', this.death);
}
death() {
this.element.classList.add('expl');
console.log('Avion détruit !');
}
getId(){
return this.id;
}
}
let planes = [];
const plane1 = new Plane();
const plane2 = new Plane();
const plane3 = new Plane();
planes.push(plane1);
planes.push(plane2);
planes.push(plane3);
Ready to run.
Test | Ops/sec | |
---|---|---|
Boucle for...of |
| ready |
Boucle for classique |
| ready |
Méthode forEach() |
| ready |
Méthode map() |
| ready |
Méthode forEach() bis |
| ready |
Boucle for...in |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.