Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0
Chrome 126
Windows
Desktop
2 years ago
Benchmark.js
With Iteration and Assignment
3.3M/s
With Iteration and .keys().forEach
2.8M/s
With Object.assign()
1.9M/s
View exact numbers
Test name Executions per second
With Iteration and Assignment 3,340,340 Ops/sec
With Iteration and .keys().forEach 2,824,926 Ops/sec
With Object.assign() 1,931,154 Ops/sec
Tests: