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
273/s
Array.prototype.push.apply()
270/s
push spread operator
162/s
View exact numbers
| Test name |
Executions per second |
|
✓
Array.prototype.concat
|
273 Ops/sec |
|
Array.prototype.push.apply()
|
270 Ops/sec |
|
forEach push
|
269 Ops/sec |
|
Lodash concat
|
186 Ops/sec |
|
push spread operator
|
162 Ops/sec |
|
spread operator
|
82 Ops/sec |
Tests:
-
push spread operator
-
Lodash concat
-
Array.prototype.push.apply()
-
spread operator
-
Array.prototype.concat
-
forEach push