Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array concat vs spread operator vs push (Single item)
(version: 1)
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:
one year ago
by:
Guest
Jump to the latest result
Tests:
Array.prototype.concat
var params = [ 7 ]; var other = [ 1, 2 ].concat(params);
spread operator
var params = [ 7 ]; var other = [ 1, 2, ...params ]
Push
var params = [ 7 ]; var other = [ 1, 2 ].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:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Browser/OS:
Chrome 132 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Array.prototype.concat
16966134.0 Ops/sec
spread operator
67333624.0 Ops/sec
Push
74274056.0 Ops/sec
Related benchmarks:
Array concat vs spread operator vs push for single element
Array concat vs spread operator vs push - single element
Array concat vs spread operator vs push555
Array concat vs spread operator vs push vs push individual
Array concat vs spread operator vs push single item
Array concat vs spread operator vs push mine
Array concat vs spread operator vs push (for single item)
Array concat vs spread operator vs push - Assign to same variable name
Array concat vs spread operator vs push vs prototype.push.apply
Comments
Confirm delete:
Do you really want to delete benchmark?