Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0
Firefox 109
Windows
Desktop
one year ago
Test name Executions per second
Reduce and Spread 5135.9 Ops/sec
ForEach and Mutate (for .. in loop) 1228.0 Ops/sec
Mutate with Object.assign 16585.3 Ops/sec
Foreach and Mutate (Object.assign) 9119.8 Ops/sec
Script Preparation code:
Tests:
  • Reduce and Spread

  • ForEach and Mutate (for .. in loop)

  • Mutate with Object.assign

  • Foreach and Mutate (Object.assign)