Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
Chrome 89
Mac OS X 11.2.0
Desktop
3 years ago
Test name Executions per second
Array.prototype.concat 2741838.0 Ops/sec
Lodash concat 1100795.8 Ops/sec
Array.prototype.push.apply() 1629432.0 Ops/sec
spread operator 4143611.0 Ops/sec
cached for + push 539385.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Array.prototype.concat

  • Lodash concat

  • Array.prototype.push.apply()

  • spread operator

  • cached for + push