Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Direct call vs bind vs closure
(version: 1)
Comparing performance of:
direct call vs bind vs call
Created:
7 months ago
by:
Guest
Go to the latest result
Script Preparation code:
function test(msg) { var d = msg; }
Tests:
direct call
test("Hello");
bind
test.bind(null, "Hello")();
call
(() => test("hello"))()
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
direct call
bind
call
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
7 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 Edg/143.0.0.0
Browser/OS:
Chrome 143 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
direct call
217.0M/s
call
191.8M/s
bind
134.9M/s
View exact numbers
Test name
Executions per second
✓
direct call
216,982,544 Ops/sec
call
191,819,568 Ops/sec
bind
134,885,136 Ops/sec
Related benchmarks
Direct call vs bind vs call vs apply
Direct call vs bind vs call vs apply (don't re-create bound function every time)
Direct call vs saved bind vs inline bind vs call vs apply vs closure
Direct call vs bind vs call vs apply vs static bound
Comments
Confirm delete:
Do you really want to delete benchmark?