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 ClosureColor(name) {
Object.defineProperties(this, {
// Have no choice but to add these methods to the instance
name: {
get: function () {
return name;
},
set: function (n) {
name = n;
}
}
});
}
function PropertyColor(name) {
this._name = name;
Object.defineProperties(this, {
name: {
get: function () {
return this._name;
},
set: function (n) {
this._name = n;
}
}
});
}
function PrototypeColor(name) {
this._name = name;
}
PrototypeColor.prototype = {
get name() {
return this._name;
},
set name(name) {
this._name = name;
}
};
Ready to run.
Test | Ops/sec | |
---|---|---|
Closure |
| ready |
Property |
| ready |
Prototype |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.