Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36 Edg/91.0.864.37
Chrome 91
Windows
Desktop
3 years ago
Test name Executions per second
Using Array.prototype.concat 8082686.5 Ops/sec
Using Array.prototype.push.apply 5358086.5 Ops/sec
Using arr1.push.apply 23347886.0 Ops/sec
Using push with spread operator 23677402.0 Ops/sec
Using spread operator to create new array 23460336.0 Ops/sec
Tests:
  • Using concat

  • Using prototype.push.apply

  • Using arr1.push.apply

  • Using push spread operator

  • Using spread operator