Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array.apply vs ... (spread)
(version: 1)
Array.apply vs ... (spread)
Comparing performance of:
makeCallApply vs makeCallSpread
Created:
5 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
function makeCallApply() { (function() { // Test case 내부에서 chunk 생성 const chunk = new Array(10000); for (let i = 0; i < 10000; i++) chunk[i] = i; (function test(a, b, c, ...rest) { // 빈 함수, 호출 오버헤드만 측정 }).apply(null, chunk); })(); } function makeCallSpread() { (function() { const chunk = new Array(10000); for (let i = 0; i < 10000; i++) chunk[i] = i; (function test(a, b, c, ...rest) { // 빈 함수 })(...chunk); })(); }
Tests:
makeCallApply
makeCallApply()
makeCallSpread
makeCallSpread()
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
makeCallApply
makeCallSpread
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
5 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Whale/4.34.340.19 Safari/537.36
Browser/OS:
Chrome 140 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
makeCallApply
107705.3 Ops/sec
makeCallSpread
110559.7 Ops/sec
Related benchmarks:
Spread operator vs. slice
Spread operator vs. slice
Spread operator vs. slice small
Spread operator vs. slice small real
Array.from vs Spread2
Array.concat vs Spread(...)
Spread vs deconstruction
TestLoop
TypedArray.apply vs ... (spread)
Comments
Confirm delete:
Do you really want to delete benchmark?