Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Chrome 129
Windows
Desktop
one year ago
Benchmark.js
Array.prototype.concat
2.3M/s
spread operator
1.7M/s
Lodash concat
1.1M/s
Array.prototype.push.apply()
1.1M/s
cached for + push
424K/s
View exact numbers
Test name Executions per second
Array.prototype.concat 2,305,864 Ops/sec
spread operator 1,659,320 Ops/sec
Lodash concat 1,113,551 Ops/sec
Array.prototype.push.apply() 1,096,512 Ops/sec
cached for + push 424,286 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: