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
Jump 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:
4 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
Test name
Executions per second
direct call
49955024.0 Ops/sec
bind
54449916.0 Ops/sec
call
48901348.0 Ops/sec
apply
43183820.0 Ops/sec
Related benchmarks:
Direct call vs bind vs call vs apply
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 2
Direct call vs bind vs call vs apply vs prebind
Direct call vs bind vs call vs apply (with precreated arg variables)
direct vs bind vs apply vs call
Direct call vs bind vs call vs apply v2
Direct call vs bind vs call vs apply vs static bound
Comments
Confirm delete:
Do you really want to delete benchmark?