Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
create class instances check method arrow vs bind vs no-bind
measure the performance of a class method defined with arrow function vs bind vs no-bind
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
create 1000 instances call arrow method
588987.2 Ops/sec
create 1000 instances call bind method
1250095.5 Ops/sec
create 1000 instances call no bind method
1522311.1 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
class ArrowMethod { constructor() { } method = () => {} } class BindMethod { constructor() { this.method.bind(this) } method() {} } class NoBind { constructor() { } method() {} } const n = new NoBind() const a = new ArrowMethod() const b = new BindMethod()
Tests:
create 1000 instances call arrow method
for (let i=0;i<1000;i++){ new ArrowMethod().method() }
create 1000 instances call bind method
for (let i=0;i<1000;i++){ new BindMethod().method() }
create 1000 instances call no bind method
for (let i=0;i<1000;i++){ new NoBind().method() }