Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
Firefox 88
Windows
Desktop
3 years ago
Test name Executions per second
Array.prototype.concat 8189177.0 Ops/sec
Lodash concat 2534257.2 Ops/sec
Array.prototype.push.apply() 3005951.5 Ops/sec
spread operator 4696609.0 Ops/sec
cached for + push 1357360.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Array.prototype.concat

  • Lodash concat

  • Array.prototype.push.apply()

  • spread operator

  • cached for + push