Script Preparation code:
Tests:

Historical Performance Data aggregated from 9 community runs

Desktop Results:
Chrome 9 runs
Set.has()
12.5M/s
Map.has()
12.4M/s
Obj[]
12.2M/s
binary search
5.5M/s
Includes
854K/s

Fastest: Set.has() (14.6x faster)

View exact numbers
  • Set.has(): 12,494,117 ops/sec
  • Map.has(): 12,356,943 ops/sec
  • Obj[]: 12,237,529 ops/sec
  • binary search: 5,478,773 ops/sec
  • Includes: 853,885 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Includes
    binary search
    Map.has()
    Set.has()
    Obj[]

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Chrome 132 on Chrome OS 14541.0.0
View result in a separate tab
Obj[]
70.4M/s
Set.has()
69.7M/s
Map.has()
64.7M/s
binary search
20.5M/s
Includes
2.2M/s
View exact numbers
Test name Executions per second
Obj[] 70,360,144 Ops/sec
Set.has() 69,655,992 Ops/sec
Map.has() 64,704,756 Ops/sec
binary search 20,546,908 Ops/sec
Includes 2,176,194 Ops/sec