Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Direct call vs bound call vs call vs apply
(version: 1)
Comparing performance of:
direct call vs bind vs call vs apply
Created:
one year ago
by:
Guest
Go to the latest result
Script Preparation code:
function test(msg) { var d = msg; } var bound = test.bind(null, "Hello");
Tests:
direct call
test("Hello");
bind
bound();
call
test.call(null, "Hello");
apply
test.apply(null, ["Hello"]);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
direct call
bind
call
apply
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
7 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Browser/OS:
Chrome 143 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
bind
54.4M/s
direct call
50.0M/s
call
48.9M/s
apply
43.2M/s
View exact numbers
Test name
Executions per second
✓
bind
54,449,916 Ops/sec
direct call
49,955,024 Ops/sec
call
48,901,348 Ops/sec
apply
43,183,820 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 bind vs call vs apply (with precreated arg variables)
Direct call vs bind vs call vs apply vs static bound
Comments
Confirm delete:
Do you really want to delete benchmark?