concat vs spread operator vs push 3
Compare the new ES6 spread operator with the traditional concat() method and push
4 years ago
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
Test name |
Executions per second |
Array.prototype.concat |
6553641.0 Ops/sec |
spread operator |
7269057.5 Ops/sec |
Push |
9452833.0 Ops/sec |
Tests:
-
Array.prototype.concat
-
spread operator
-
Push
Open this result on MeasureThat.net