Test name | Executions per second |
---|---|
Call class method | 6294433.5 Ops/sec |
Call instance method | 3080786.0 Ops/sec |
Call bound method | 5557000.5 Ops/sec |
window.A = class {
a() {}
}
window.B = class {
b = () => {};
}
window.C = class {
constructor() {
this.c = this.c.bind(this);
}
c() {}
}
(new A()).a();
(new B()).b();
(new C()).c();