Script Preparation code:
AخA
 
var test=[];
for(let i=0; i<2000;i++){
    test[i] = i;
}
Tests:
  • set

     
    const set = new Set(test);
  • array

     
    const arr = new Array(test);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    set
    array

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0
Firefox 110 on Windows
View result in a separate tab
Test name Executions per second
set 10149.6 Ops/sec
array 13563284.0 Ops/sec