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
Klass1 = function(p) { this.p = p; }
Klass1.prototype.foo = function() {
log('foo' + this.p);
}
Klass1.prototype.bar = function() {
log('bar' + this.p);
}
Klass2 = function(p) {
var foo = function(p) {
log('foo' + p);
},
bar = function(p) {
log('bar' + p);
};
return {foo: foo, bar: bar}
}
var FooFunction = function() {
log('foo' + this.p);
};
var BarFunction = function() {
log('bar' + this.p);
};
Klass3 = function(p) {
this.p = p;
return {foo: FooFunction.bind(this), bar: BarFunction.bind(this)}
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Prototypal |
| ready |
Module pattern |
| ready |
Module pattern with cached functions |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.