Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
call spread vs apply
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0
Browser:
Firefox 142
Operating system:
Linux
Device Platform:
Desktop
Date tested:
10 months ago
apply
95/s
spread
20/s
View exact numbers
Test name
Executions per second
✓
apply
95 Ops/sec
spread
20 Ops/sec
Script Preparation code:
let arr = Array.from({length:500},(a,index)=>index) function average(...numbers){return numbers.reduce((a,b)=>a+b)/numbers.length}
Tests:
spread
for (let i = 3000; --i;) var result = average.call(null,...arr)
apply
for (let i = 3000; --i;) var result = average.apply(null,arr)