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
139/s
Array.prototype.push.apply()
133/s
push spread operator
100/s
View exact numbers
| Test name |
Executions per second |
|
✓
Lodash concat
|
170 Ops/sec |
|
forEach push
|
141 Ops/sec |
|
Array.prototype.concat
|
139 Ops/sec |
|
Array.prototype.push.apply()
|
133 Ops/sec |
|
push spread operator
|
100 Ops/sec |
|
spread operator
|
53 Ops/sec |
Tests:
-
push spread operator
-
Lodash concat
-
Array.prototype.push.apply()
-
spread operator
-
Array.prototype.concat
-
forEach push