Script Preparation code:
Tests:

Historical Performance Data aggregated from 64 community runs

Desktop Results:
Chrome 54 runs
indexOf
7.6M/s
split
4.8M/s

Fastest: indexOf (1.6x faster)

View exact numbers
  • indexOf: 7,633,111 ops/sec
  • split: 4,781,293 ops/sec
Firefox 10 runs
indexOf
1090.4M/s
split
5.2M/s

Fastest: indexOf (209.1x faster)

View exact numbers
  • indexOf: 1,090,445,312 ops/sec
  • split: 5,215,633 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
    split

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 OPR/126.0.0.0 (Edition Yx 08)
Opera 126 on Windows
View result in a separate tab
indexOf
86.9M/s
split
8.3M/s
View exact numbers
Test name Executions per second
indexOf 86,870,696 Ops/sec
split 8,310,664 Ops/sec