Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
call vs apply
(version: 1)
Comparing performance of:
call vs apply
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
/*your preparation JavaScript code goes here To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/ function max(...args) { return Math.max(this.a, this.b, this.c, ...args); } var object = { a: 5, b: 6, c: 7, max_call(...args) { return max.call(this, ...args); }, max_apply(...args) { return max.apply(this, args); } }; async function globalMeasureThatScriptPrepareFunction() { // This function is optional, feel free to remove it. // await someThing(); }
Tests:
call
object.max_call(1, 2, 3);
apply
object.max_apply(1, 2, 3);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
call
apply
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
7 months ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0
Browser/OS:
Firefox 142 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
call
8753499.0 Ops/sec
apply
17444860.0 Ops/sec
Related benchmarks:
prototype function
Math.max/min vs if vs ternary operator vs custom function
asdfasdffdas
Find Smallest Number Not In An Array With Dynamic Max Value
Math.max() vs Custom
Math.max() spread vs reduce() vs apply()
Math.max() without spread vs reduce vs apply
array math.max (3 variants) vs for loop (5 variants)
test slice czourhgirzjgprz
Comments
Confirm delete:
Do you really want to delete benchmark?