Script Preparation code:
Tests:

Historical Performance Data aggregated from 227 community runs

Desktop Results:
Chrome 181 runs
Array.indexOf
1.4M/s
Array.some
223K/s
Array.filter
49K/s

Fastest: Array.indexOf (27.9x faster)

View exact numbers
  • Array.indexOf: 1,363,023 ops/sec
  • Array.some: 222,840 ops/sec
  • Array.filter: 48,770 ops/sec
Firefox 35 runs
Array.indexOf
199K/s
Array.some
31K/s
Array.filter
18K/s

Fastest: Array.indexOf (11.2x faster)

View exact numbers
  • Array.indexOf: 199,400 ops/sec
  • Array.some: 31,168 ops/sec
  • Array.filter: 17,794 ops/sec
Mobile Results:
Chrome 11 runs
Array.indexOf
710K/s
Array.some
73K/s
Array.filter
29K/s

Fastest: Array.indexOf (24.9x faster)

View exact numbers
  • Array.indexOf: 709,869 ops/sec
  • Array.some: 72,865 ops/sec
  • Array.filter: 28,565 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
    Array.some
    Array.filter
    Array.indexOf

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (X11; Linux x86_64; rv:152.0) Gecko/20100101 Firefox/152.0
Firefox 152 on Linux
View result in a separate tab
Array.indexOf
280K/s
Array.some
38K/s
Array.filter
20K/s
View exact numbers
Test name Executions per second
Array.indexOf 280,056 Ops/sec
Array.some 38,466 Ops/sec
Array.filter 20,006 Ops/sec