Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127
Mac OS X 10.15.7
Desktop
3 months ago
Test name Executions per second
Reduce and Spread 56009.0 Ops/sec
ForEach and Mutate (for .. in loop) 237257.6 Ops/sec
Mutate with Object.assign 159431.8 Ops/sec
Foreach and Mutate (Object.assign) 13880.9 Ops/sec
Reduce Mutate 15005.5 Ops/sec
reduce mutate 2 232357.6 Ops/sec
reduce mutate 3 14103.1 Ops/sec
Script Preparation code:
Tests:
  • Reduce and Spread

  • ForEach and Mutate (for .. in loop)

  • Mutate with Object.assign

  • Foreach and Mutate (Object.assign)

  • Reduce Mutate

  • reduce mutate 2

  • reduce mutate 3


;