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
"use strict";
Function.prototype.defineclass = function (base, proto) {
function I() { };
I.prototype = base.prototype;
var v = new I;
v.constructor = this;
this.prototype = v;
var i;
if (proto instanceof Function) {
i = {};
proto.call(i);
} else {
i = proto;
}
for (var name in i) {
this.prototype[name] = i[name];
var fn = base[name] || base.prototype[name];
if (fn) {
this.prototype["$" + name] = fn;
}
}
this.prototype["$boot"] = base.prototype.constructor;
};
function F0() {
}
function F1() {
this.X = 0;
}
F1.defineclass(F0, { incIt: function() { this.X = this.X + 1; } });
F1.prototype.q = function() { this.X = this.X + 1; };
function F2() {
this.$boot();
}
F2.defineclass(F1, { incIt2: function () { this.X = this.X + 1; } });
var f1 = new F1();
var f2 = new F2();
Ready to run.
Test | Ops/sec | |
---|---|---|
T1 |
| ready |
t2 |
| ready |
t3 |
| ready |
t3 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.