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
let A = 0;
function foo(a) {
A += a
}
const FOO = Symbol()
class B {}
B.prototype.foo = foo;
B.prototype.foofoofoo = foo;
B.prototype[FOO] = foo;
const FAA = Symbol()
Object.defineProperty(B.prototype, FAA, {
value: foo,
enumerable: false,
configurable: false,
writtable: false
})
Object.defineProperty(B.prototype, "foo_A", {
value: foo,
enumerable: false,
configurable: false,
writtable: false
})
Object.defineProperty(B.prototype, "foo_B", {
value: foo,
enumerable: true,
configurable: false,
writtable: false
})
Object.defineProperty(B.prototype, "foo_C", {
value: foo,
enumerable: false,
configurable: true,
writtable: false
})
Object.defineProperty(B.prototype, "foo_D", {
value: foo,
enumerable: false,
configurable: false,
writtable: true
})
let b = new B();
Ready to run.
Test | Ops/sec | |
---|---|---|
Function |
| ready |
Method call |
| ready |
Method call from proto |
| ready |
Method call from proto + symbol |
| ready |
Symbol method call |
| ready |
Long method name |
| ready |
Prop FAA |
| ready |
Prop A |
| ready |
Prop B |
| ready |
Prop C |
| ready |
Prop D |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.