Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Arrow call vs bind vs call vs apply with bound options
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/148.0.0.0 Safari/537.36
Browser:
Chrome 148
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 months ago
bind
160.9M/s
call
160.9M/s
arrow call
160.1M/s
apply
69.1M/s
View exact numbers
Test name
Executions per second
✓
bind
160,876,128 Ops/sec
call
160,867,776 Ops/sec
arrow call
160,117,664 Ops/sec
apply
69,123,232 Ops/sec
Script Preparation code:
function test(msg) { var d = this.hello + msg } function testContext(self,msg) { var d = self.hello + msg } let opts = { hello:1, world:2 }
Tests:
arrow call
((msg)=>testContext(opts,"Hello"))()
bind
test.bind(opts, "Hello")();
call
test.call(opts, "Hello");
apply
test.apply(opts, ["Hello"]);