Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Windows
Desktop
2 years ago
Object.assign with blank object
2.3M/s
Object.assign with blank object and prototype prop
1.6M/s
Object.assign with created object
1.3M/s
Object.assign with blank object and prototype
1.2M/s
Iteration with blank object
857K/s
Iteration with blank object and prototype prop
725K/s
Iteration with created object
663K/s
Iteration with blank object and prototype
640K/s
View exact numbers
Test name Executions per second
Object.assign with blank object 2,311,630 Ops/sec
Object.assign with blank object and prototype prop 1,597,628 Ops/sec
Object.assign with created object 1,338,702 Ops/sec
Object.assign with blank object and prototype 1,236,175 Ops/sec
Iteration with blank object 857,258 Ops/sec
Iteration with blank object and prototype prop 724,508 Ops/sec
Iteration with created object 662,647 Ops/sec
Iteration with blank object and prototype 639,820 Ops/sec
Script Preparation code:
Tests: