Script Preparation code:
Tests:

Historical Performance Data aggregated from 7 community runs

Desktop Results:
Chrome 7 runs
set
9.6M/s
object lookup
3.5M/s
indexOf
1.1M/s
includes
1.1M/s
findIndex
645K/s
find
642K/s

Fastest: set (15.0x faster)

View exact numbers
  • set: 9,621,432 ops/sec
  • object lookup: 3,496,761 ops/sec
  • indexOf: 1,134,344 ops/sec
  • includes: 1,126,242 ops/sec
  • findIndex: 645,328 ops/sec
  • find: 642,071 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
    indexOf
    includes
    find
    findIndex
    set
    object lookup

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Chrome 132 on Windows
View result in a separate tab
set
19.9M/s
object lookup
7.9M/s
indexOf
2.6M/s
includes
2.5M/s
find
1.2M/s
findIndex
1.2M/s
View exact numbers
Test name Executions per second
set 19,929,088 Ops/sec
object lookup 7,929,826 Ops/sec
indexOf 2,628,352 Ops/sec
includes 2,521,472 Ops/sec
find 1,196,102 Ops/sec
findIndex 1,190,837 Ops/sec