Script Preparation code:
Tests:

Historical Performance Data aggregated from 16 community runs

Desktop Results:
Chrome 16 runs
filter
18.3M/s
indexOf + splice
6.3M/s

Fastest: filter (2.9x faster)

View exact numbers
  • filter: 18,260,132 ops/sec
  • indexOf + splice: 6,317,691 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 + splice
    filter

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0
Firefox 146 on Mac OS X 10.15
View result in a separate tab
filter
318.7M/s
indexOf + splice
36.7M/s
View exact numbers
Test name Executions per second
filter 318,682,560 Ops/sec
indexOf + splice 36,678,748 Ops/sec