Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
With Iteration and Assignment
4.2M/s
With Iteration and .keys().forEach
3.5M/s
With Object.assign()
2.3M/s

Fastest: With Iteration and Assignment (1.8x faster)

View exact numbers
  • With Iteration and Assignment: 4,197,512 ops/sec
  • With Iteration and .keys().forEach: 3,510,346 ops/sec
  • With Object.assign(): 2,275,095 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    With Object.assign()
    With Iteration and Assignment
    With Iteration and .keys().forEach

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
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 on Windows
View result in a separate tab
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