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 AttributeValue(value){
this.value = value;
}
function DefinePropertyValue(value){
Object.defineProperty(this, 'value', {
value: value
});
}
function DefinePropertyGetSet(value){
Object.defineProperty(this, 'value', {
get:function(){ return value },
set:function(newValue){ value = newValue}
});
}
function build(Constructor){
return new Constructor(new Constructor(new Constructor(new Constructor)));
}
var attributeValue = build(AttributeValue);
var definePropertyValue = build(DefinePropertyValue);
var definePropertyGetSet = build(DefinePropertyGetSet);
function read(value){
return value.value
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Attribute |
| ready |
Object.defineProperty : get set |
| ready |
Object.defineProperty : value |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.