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
Testing properties with values, rather than functions
function TraditionalPrototypeClass() {
}
TraditionalPrototypeClass.prototype.foo = [1,2,3];
TraditionalPrototypeClass.prototype.bar = [1,2,3];
function ModulePatternClass() {
this.foo = [1,2,3];
this.bar = [1,2,3];
}
var ModuleCachePatternClass = (function () {
var foo = [1,2,3];
var bar = [1,2,3];
return function () {
this.foo = foo;
this.bar = bar;
};
}());
var standardObject = Object.seal({
foo: [1,2,3],
bar: [1,2,3]
});
Ready to run.
Test | Ops/sec | |
---|---|---|
Prototypal |
| ready |
Module pattern |
| ready |
Module pattern with cached functions |
| ready |
Use the right tool for the job |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.