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
Jump 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:
12 days 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
Test name
Executions per second
spread call
120.0 Ops/sec
apply
405.7 Ops/sec
Related benchmarks:
Spread vs. Apply
push spread irek2
Array slice vs spread
Array.from vs Spread declaring the Set
Array.from vs spread 123
array.from vs spread with set
Array spread vs push 2
push or spread
Spread whole array vs push [JS]
Comments
Confirm delete:
Do you really want to delete benchmark?