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
<script>
A = function() {
this._factor = 2;
}
A.prototype = {
methodA: function(value) {
return this.methodB(value) * this._factor;
},
methodB: function(value) {
return value * this._factor;
}
};
B = function() {
this._factor = 2;
}
B.prototype.methodA = function(value) {
return this.methodB(value) * this._factor;
}
B.prototype.methodB = function(value) {
return value * this._factor;
}
C = function() {
var _factor = 2;
this.methodA = function(value) {
return this.methodB(value) * _factor;
};
this.methodB = function(value) {
return value * _factor;
}
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
json prototype |
| ready |
prototype |
| ready |
nested functions |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.