Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0
Firefox 112
Windows
Desktop
one year ago
Test name Executions per second
Using array spread 2359808.8 Ops/sec
Using clone and push loop 8176128.5 Ops/sec
Using clone and push spread 2987195.5 Ops/sec
Using clone and push spread 2 2301438.0 Ops/sec
Using push spread 1937301.1 Ops/sec
Using array concat 5101535.0 Ops/sec
Using array concat (2) 2438648.2 Ops/sec
Script Preparation code:
Tests:
  • Using array spread

  • Using clone and push loop

  • Using clone and push spread

  • Using clone and push spread 2

  • Using push spread

  • Using array concat

  • Using array concat (2)