Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome 124
Windows
Desktop
2 years ago
Benchmark.js
With Iteration and Assignment
4.1M/s
With Iteration and .keys().forEach
3.4M/s
With Object.assign()
2.2M/s
View exact numbers
Test name Executions per second
With Iteration and Assignment 4,062,657 Ops/sec
With Iteration and .keys().forEach 3,414,394 Ops/sec
With Object.assign() 2,186,395 Ops/sec
Tests: