Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36
Chrome 67
Mac OS X 10.13.5
Desktop
6 years ago
Test name Executions per second
Array.prototype.concat 5808181.0 Ops/sec
spread operator 5720400.0 Ops/sec
Tests:
  • Array.prototype.concat

    AخA
     
    var first = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
    var second = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
    var other = first.concat(second);
  • spread operator

     
    var first = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
    var second = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
    var other = [ ...first, ...second ]