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 createObj(name, value) {
return { name, value }
}
class Foo1 {}
class Foo2 {
constructor(name, value) {
this.name = name
this.value = name
}
}
class Foo3 {
constructor() {
this.foo = () => {}
this.bar = () => {}
}
}
class Foo4 {
foo() {}
bar() {}
}
function FunctionClass() {}
Ready to run.
Test | Ops/sec | |
---|---|---|
new Object |
| ready |
class Instance |
| ready |
create instance with defaults |
| ready |
create object via function |
| ready |
create object via new operator |
| ready |
create instance via Function |
| ready |
create instance assign functions in constructor |
| ready |
create instance with methods |
| ready |
create array with objects 1 |
| ready |
create array of instances 1 |
| ready |
create array of instances 2 |
| ready |
create array with objects 2 |
| ready |
create array with objects 3 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.