Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:85.0) Gecko/20100101 Firefox/85.0
Firefox 85
Mac OS X 10.15
Desktop
3 years ago
Test name Executions per second
Array.prototype.concat 5234301.5 Ops/sec
Lodash concat 1880412.4 Ops/sec
Array.prototype.push.apply() 2286631.8 Ops/sec
spread operator 2947197.8 Ops/sec
cached for + push 1425417.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Array.prototype.concat

  • Lodash concat

  • Array.prototype.push.apply()

  • spread operator

  • cached for + push