Script Preparation code:
x
 
var obj = new Object();
var keys = new Array(100).fill(0).map((x, i) => {
  return i + 1;
});
keys.forEach((x) => {
  obj["prop" + x] = {
    value: x
  };
});
var array = [];
let i = 0;
for (i; i < 100; i++) {
  array[i] = {
    props: "prop" + i,
    value: i
  };
}
Tests:
  • Object

     
    if (obj.hasOwnProperty('prop98')) {
      console.log(obj['prop98'])
    }
  • Array

     
    array.forEach((value) => {
      if (value.props === "prop98") {
        console.log(value.value);
      }
    });
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Object
    Array

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 15_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 DuckDuckGo/7 Safari/605.1.15
Mobile Safari 15 on iOS 15.4
View result in a separate tab
Test name Executions per second
Object 662871.9 Ops/sec
Array 186478.5 Ops/sec