Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 OPR/109.0.0.0
Opera 109
Windows
Desktop
5 months ago
Test name Executions per second
Reduce and Spread 16362.6 Ops/sec
ForEach and Mutate (for .. in loop) 57068.5 Ops/sec
Mutate with Object.assign 36093.6 Ops/sec
Foreach and Mutate (Object.assign) 3753.2 Ops/sec
Script Preparation code:
Tests:
  • Reduce and Spread

  • ForEach and Mutate (for .. in loop)

  • Mutate with Object.assign

  • Foreach and Mutate (Object.assign)