Script Preparation code:
AخA
 
var obj = {
  $props : ['a','b','c'],
  a:1,
  b:2,
  c:3
}
Tests:
  • asta castiga btw

     
    let n = 0;
    for (let k in obj) {
      n++;
    }
  • meh

     
    const arr = Object.keys(obj);
    let n = 0;
    for (let i = 0; i < arr.length; i++) {
      n++;
    }
  • meh 2

     
    const arr = Object.getOwnPropertyNames(obj);
    let n = 0;
    for (let i = 0; i < arr.length; i++) {
      n++;
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    asta castiga btw
    meh
    meh 2

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36
Chrome 74 on Windows
View result in a separate tab
Test name Executions per second
asta castiga btw 5259094.0 Ops/sec
meh 2147182.2 Ops/sec
meh 2 2068514.9 Ops/sec