Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array concat vs spread operator vs push (2)
(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:
11 months ago
by:
Guest
Jump to the latest result
Script Preparation code:
var params = [ "hello", true, 7 ];
Tests:
Array.prototype.concat
var other = [ 1, 2 ].concat(params);
spread operator
var other = [ 1, 2, ...params ]
Push
var other = [ 1, 2 ]; other.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:
8 months ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0
Browser/OS:
Firefox 141 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Array.prototype.concat
31195062.0 Ops/sec
spread operator
31067948.0 Ops/sec
Push
30980012.0 Ops/sec
Related benchmarks:
Array.prototype.concat vs spread operator vs push
Array.prototype.concat vs spread operator vs Array.prototype.push
Array.prototype.concat vs spread operator vs push vs spread 2
Array.prototype.concat vs spread operator vs push 2
Array.prototype.concat vs spread operator vs push1312323123123
Array.prototype.concat vs spread operator vs push x
Array concat vs spread operator vs push333
Array testing - prototype.concat vs spread operator vs push
Array.prototype.concat vs spread operator vs push OPT
Comments
Confirm delete:
Do you really want to delete benchmark?