Script Preparation code:
AخA
 
var a = [];
for(i=0;i<10000;i++) a.push(i);
var b = new Set(a)
Tests:
  • array

     
    a.indexOf(342);
  • set

     
    b.has(342);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    array
    set

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Chrome 108 on Windows
View result in a separate tab
Test name Executions per second
array 591599424.0 Ops/sec
set 576916992.0 Ops/sec