Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.122 Safari/537.36 Vivaldi/2.3.1440.60
Chrome 72
Windows
Desktop
5 years ago
Test name Executions per second
immutable with concat 244.3 Ops/sec
mutation with splice + spread 6619.3 Ops/sec
mutation with splice into preallocated array 8400.9 Ops/sec
mutation with loop-assign 124637.4 Ops/sec
Tests:
  • immutable with concat

  • mutation with splice + spread

  • mutation with splice into preallocated array

  • mutation with loop-assign