Script Preparation code:
Tests:

Historical Performance Data aggregated from 75 community runs

Desktop Results:
Chrome 69 runs
Split
17.4M/s
Substring
13.1M/s
Regex 1
7.0M/s
Regex 2
202K/s

Fastest: Split (86.2x faster)

View exact numbers
  • Split: 17,380,608 ops/sec
  • Substring: 13,094,294 ops/sec
  • Regex 1: 6,970,800 ops/sec
  • Regex 2: 201,665 ops/sec
Firefox 6 runs
Substring
639.4M/s
Regex 1
7.1M/s
Split
6.1M/s
Regex 2
247K/s

Fastest: Substring (2590.6x faster)

View exact numbers
  • Substring: 639,386,944 ops/sec
  • Regex 1: 7,104,766 ops/sec
  • Split: 6,063,029 ops/sec
  • Regex 2: 246,811 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
    Regex 1
    Regex 2
    Split
    Substring

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0
Chrome 144 on Windows
View result in a separate tab
Substring
33.8M/s
Split
26.2M/s
Regex 1
9.0M/s
Regex 2
275K/s
View exact numbers
Test name Executions per second
Substring 33,836,904 Ops/sec
Split 26,167,660 Ops/sec
Regex 1 8,969,296 Ops/sec
Regex 2 274,761 Ops/sec