Array.prototype.concat vs spread vs push 08072019
4 years ago
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36
Test name |
Executions per second |
Array.prototype.concat |
2970855.0 Ops/sec |
spread operator |
25736020.0 Ops/sec |
Push |
34842310.0 Ops/sec |
Tests:
-
Array.prototype.concat
-
spread operator
-
Push
Open this result on MeasureThat.net