Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36 Edg/135.0.0.0
Chrome 135
Windows
Desktop
one year ago
Benchmark.js
With Iteration and .keys().forEach
96.7M/s
With Iteration and Assignment
94.4M/s
With Object.assign()
12.7M/s
View exact numbers
Test name Executions per second
With Iteration and .keys().forEach 96,689,456 Ops/sec
With Iteration and Assignment 94,440,928 Ops/sec
With Object.assign() 12,746,640 Ops/sec
Tests: