Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Chrome 128
Windows
Desktop
one year ago
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
View exact numbers
Test name Executions per second
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
Script Preparation code:
Tests: