Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Linux
Desktop
2 years ago
Benchmark.js
Array.prototype.concat
180/s
Array.prototype.push.apply()
127/s
push spread operator
102/s
View exact numbers
| Test name |
Executions per second |
|
✓
Array.prototype.concat
|
180 Ops/sec |
|
Lodash concat
|
170 Ops/sec |
|
forEach push
|
139 Ops/sec |
|
Array.prototype.push.apply()
|
127 Ops/sec |
|
push spread operator
|
102 Ops/sec |
|
spread operator
|
53 Ops/sec |
Tests:
-
push spread operator
-
Lodash concat
-
Array.prototype.push.apply()
-
spread operator
-
Array.prototype.concat
-
forEach push