Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
bind-vs-arrow
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/147.0.0.0 Safari/537.36
Browser:
Chrome 147
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
21 days ago
Test name
Executions per second
bind
146808032.0 Ops/sec
arrow
156480288.0 Ops/sec
Script Preparation code:
class A { execute() { } callback1() {} callback2() {} } window.a = new A();
Tests:
bind
a.execute = function () { let bound1 = this.callback1.bind(this); let bound2 = this.callback2.bind(this); bound1(); bound2(); } a.execute();
arrow
a.execute = function () { let bound1 = () => this.callback1(); let bound2 = () => this.callback2(); bound1(); bound2(); } a.execute();