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
class Foo {
_a = 0
set a(val) {
this._a = val
}
get a() {
return this._a
}
}
class ClassWithoutAccessors {
a = 0
setA(val) {
this.a = val
}
}
const state = {
a: 0
}
const bar = {
set a(val) {
state.a = val
},
get b() {
return state.a
}
}
const foo = new Foo()
const noAccessors = new ClassWithoutAccessors()
Ready to run.
Test | Ops/sec | |
---|---|---|
Class getters |
| ready |
Class setters |
| ready |
Obj getters |
| ready |
Obj setters |
| ready |
Obj getter with arraylike syntax |
| ready |
Obj setter with arraylike syntax |
| ready |
get: Class without accessors |
| ready |
set: Class without accessors |
| ready |
Class getters with arraylike syntax |
| ready |
Class setters with arraylike syntax |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.