Script Preparation code:
Tests:
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    for..in with hasOwnProperty()
    for..in without hasOwnProperty()
    Object.keys() + Array.forEach()
    Object.keys() + Array.for()

    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/99.0.4844.84 Safari/537.36
Chrome 99 on Windows
View result in a separate tab
Object.keys() + Array.for()
10K/s
Object.keys() + Array.forEach()
9K/s
for..in without hasOwnProperty()
7K/s
for..in with hasOwnProperty()
5K/s
View exact numbers
Test name Executions per second
Object.keys() + Array.for() 9,738 Ops/sec
Object.keys() + Array.forEach() 8,912 Ops/sec
for..in without hasOwnProperty() 7,128 Ops/sec
for..in with hasOwnProperty() 5,176 Ops/sec