Script Preparation code:
Tests:
  • Array.includes, 10 000 elements

  • Array.includes, 1 000 000 elements

  • Set.has, 10 000 elements

  • Set.has, 1 000 000 elements

  • Array to Set + Set.has, 10 000 elements

  • Array to Set + Set.has x 100, 10 000 elements

  • Array.includes x 100, 10 000 elements

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Array.includes, 10 000 elements
    Array.includes, 1 000 000 elements
    Set.has, 10 000 elements
    Set.has, 1 000 000 elements
    Array to Set + Set.has, 10 000 elements
    Array to Set + Set.has x 100, 10 000 elements
    Array.includes x 100, 10 000 elements

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 25 days ago)
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
Firefox 118 on Linux
View result in a separate tab
Test name Executions per second
Array.includes, 10 000 elements 21533.2 Ops/sec
Array.includes, 1 000 000 elements 200.5 Ops/sec
Set.has, 10 000 elements 6863807.0 Ops/sec
Set.has, 1 000 000 elements 6660393.5 Ops/sec
Array to Set + Set.has, 10 000 elements 527.2 Ops/sec
Array to Set + Set.has x 100, 10 000 elements 802.5 Ops/sec
Array.includes x 100, 10 000 elements 223.7 Ops/sec