Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:76.0) Gecko/20100101 Firefox/76.0
Firefox 76
Mac OS X 10.15
Desktop
4 years ago
Test name Executions per second
Array.prototype.concat 3846513.8 Ops/sec
Lodash concat 1051334.2 Ops/sec
Array.prototype.push.apply() 1242163.1 Ops/sec
spread operator 3109385.5 Ops/sec
cached for + push 1145891.1 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Array.prototype.concat

  • Lodash concat

  • Array.prototype.push.apply()

  • spread operator

  • cached for + push