Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JavaScript V8 Array.push vs spread operator
Which is faster
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Mobile/15E148 Safari/604.1
Browser:
Mobile Safari 26
Operating system:
iOS 18.7
Device Platform:
Mobile
Date tested:
24 days ago
Test name
Executions per second
Array.push in for loop
378567.0 Ops/sec
Spread operator
23449.7 Ops/sec
Tests:
Array.push in for loop
const arr1 = Array(1000).fill(0); const arr2 = Array(0); for (const el of arr1) { arr2.push(el) }
Spread operator
const arr1 = Array(10000).fill(0); let arr2 = Array(0); for (const el of arr1) { arr2 = [arr2, el] }