forEach concat vs reduce push vs forEach push vs reduce concat performance
2 years ago
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62
Test name |
Executions per second |
forEach concat |
19.9 Ops/sec |
Reduce push |
56.2 Ops/sec |
Reduce concat |
56.9 Ops/sec |
forEach push |
52.5 Ops/sec |
Tests:
-
forEach concat
-
Reduce push
-
Reduce concat
-
forEach push
Open this result on MeasureThat.net