Tests:
  • array

    AخA
     
    const MAX = 10000
    const arr = new Array(10000)  
    const f = () => {} 
    for (let i = 0; i < MAX;i++) {
      arr[i] = true 
      if (arr[i]) f(); 
    }
  • set

    x
     
    const set = new Set() 
    const MAX = 10000
    const f = () => {} 
    for (let i = 0; i < MAX;i++) {
      set.add(i)
      if (set.has(i)) f(); 
    }
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: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
array 46686.9 Ops/sec
set 2327.6 Ops/sec