Script Preparation code:
Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
ForEach and Mutate (for .. in loop)
144K/s
Mutate with Object.assign
103K/s
Reduce and Spread
57K/s
Foreach and Mutate (Object.assign)
8K/s

Fastest: ForEach and Mutate (for .. in loop) (16.9x faster)

View exact numbers
  • ForEach and Mutate (for .. in loop): 143,882 ops/sec
  • Mutate with Object.assign: 103,080 ops/sec
  • Reduce and Spread: 56,843 ops/sec
  • Foreach and Mutate (Object.assign): 8,496 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Reduce and Spread
    ForEach and Mutate (for .. in loop)
    Mutate with Object.assign
    Foreach and Mutate (Object.assign)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0
Firefox 130 on Linux
View result in a separate tab
Mutate with Object.assign
11K/s
Foreach and Mutate (Object.assign)
9K/s
Reduce and Spread
5K/s
ForEach and Mutate (for .. in loop)
1K/s
View exact numbers
Test name Executions per second
Mutate with Object.assign 11,275 Ops/sec
Foreach and Mutate (Object.assign) 8,906 Ops/sec
Reduce and Spread 5,187 Ops/sec
ForEach and Mutate (for .. in loop) 1,096 Ops/sec