Script Preparation code:
Tests:
  • for-in

  • Object.keys with forEach

  • Object.keys with reduce

  • Object.keys with for-of

  • for-in with hasOwnProperty

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    for-in
    Object.keys with forEach
    Object.keys with reduce
    Object.keys with for-of
    for-in with hasOwnProperty

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Windows NT 10.0; rv:120.0) Gecko/20100101 Firefox/120.0
Firefox 120 on Windows
View result in a separate tab
Test name Executions per second
for-in 5101.5 Ops/sec
Object.keys with forEach 3798.3 Ops/sec
Object.keys with reduce 3967.2 Ops/sec
Object.keys with for-of 2921.3 Ops/sec
for-in with hasOwnProperty 3089.0 Ops/sec