Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
es5 bind vs es6 arrow
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Browser:
Chrome 130
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
bind
4145108.2 Ops/sec
arrow
4239809.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();