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 MyClass = (function () {
function myBind(func, context) {
return function() {
func.call(context);
}
}
function MyClass() {
var _this = this;
var e = 1;
var d = 2;
var c = 3;
var b = 4;
this.a = 5;
this.closure = function () {
var b = _this.a * 2;
return b;
};
this.bound = this.bound.bind(this);
this.myBoundFunction = myBind(this.myBoundFunction, this);
}
MyClass.prototype.callback = function (cb) {
cb();
};
MyClass.prototype.bound = function () {
var b = this.a * 2;
return b;
};
MyClass.prototype.myBoundFunction = function() {
var b = this.a * 2;
return b;
}
return MyClass;
}());
var test = new MyClass();
Ready to run.
Test | Ops/sec | |
---|---|---|
Custom Bound Tets |
| ready |
Bind Test |
| ready |
Closure Test |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.