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 O(a, b) {
this.a = a;
this.b = b;
}
O.prototype.foo1 = function foo1() {
return this.a + this.b + foo1.c
};
O.prototype.foo1.c = 3;
O.prototype.foo2 = function() {
var c = 3;
return function() {
this.a + this.b + c
}
}();
var t = [];
for (var i = 0; i < 100; i++) t[i] = new O(Math.floor(Math.random() * 100), Math.floor(Math.random() * 100));
Ready to run.
Test | Ops/sec | |
---|---|---|
function prop |
| ready |
closure |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.