Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Class method / instance method / bind this – more closer to reality test
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0
Browser:
Firefox 132
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Call class method
1243444736.0 Ops/sec
Call instance method
44239164.0 Ops/sec
Call bound method
34974988.0 Ops/sec
Script Preparation code:
window.A = class { a() {} } window.AReady = new A(); window.B = class { b = () => {}; } window.BReady = new B(); window.C = class { constructor() { this.c = this.c.bind(this); } c() {} } window.CReady = new C();
Tests:
Call class method
new A();
Call instance method
new B();
Call bound method
new C();