Compare spread operator and concat in arrays
This benchmark is to compare the cost of using the spread operator
4 years ago
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36
Test name |
Executions per second |
Using the spread operator |
111250.7 Ops/sec |
Using Array.prototype.concat |
416095.7 Ops/sec |
Tests:
-
Using the spread operator
-
Using Array.prototype.concat
Open this result on MeasureThat.net