Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
spread call vs apply
(version: 1)
Comparing performance of:
spread call vs apply
Created:
one year ago
by:
Guest
Go to the latest result
Script Preparation code:
function example(...all) { return all.toReversed() } let arr = Array.from({length:1e3},(i,index)=>index)
Tests:
spread call
for(let i = 300; i--;) console.log(example.call(0,...arr))
apply
for(let i = 300; i--;) console.log(example.apply(0,arr))
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
spread call
apply
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
3 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0
Browser/OS:
Firefox 150 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
apply
406/s
spread call
120/s
View exact numbers
Test name
Executions per second
✓
apply
406 Ops/sec
spread call
120 Ops/sec
Related benchmarks
Spread whole array vs push [JS]
Comments
Confirm delete:
Do you really want to delete benchmark?