Script Preparation code:
x
 
var arr = [];
for (let i = 0; i < 1000; i++) arr[i] = i;
function randomKey() {
    return Math.floor(Math.random() * 2000);
}
Tests:
  • Undefined

     
    let r = arr[randomKey()] !== undefined;
  • In

     
    let r = randomKey() in arr;
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Undefined
    In

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Android 12; Mobile; rv:108.0) Gecko/108.0 Firefox/108.0
Firefox Mobile 108 on Android
View result in a separate tab
Test name Executions per second
Undefined 29955950.0 Ops/sec
In 28004594.0 Ops/sec