Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array concat vs spread operator vs push + spread 2023-08-21
(version: 0)
Compare the new ES6 spread operator with the traditional concat() method and push
Comparing performance of:
Array.prototype.concat vs spread operator vs Push
Created:
2 years ago
by:
Guest
Jump to the latest result
Tests:
Array.prototype.concat
var params = Array(1500).fill(0); params = [ 1 ].concat(params);
spread operator
var params = Array(1500).fill(0); params = [ 1, ...params ];
Push
var params = Array(1500).fill(0); [1].push(...params);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Array.prototype.concat
spread operator
Push
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
Array.prototype.concat vs Spread operator
concat 2 arrays: Array.prototype.concat vs spread operator
ES6 Array concat vs spread operator
Array.prototype.concat vs spread operator real
Array.prototype.concat vs spread operator 12
Comments
Confirm delete:
Do you really want to delete benchmark?