Script Preparation code:
Tests:

Historical Performance Data aggregated from 20 community runs

Desktop Results:
Chrome 20 runs
substring
71.3M/s
regex
5.2M/s

Fastest: substring (13.8x faster)

View exact numbers
  • substring: 71,291,424 ops/sec
  • regex: 5,179,853 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
    substring

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 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
Chrome 144 on Windows
View result in a separate tab
substring
39.2M/s
regex
1.9M/s
View exact numbers
Test name Executions per second
substring 39,174,312 Ops/sec
regex 1,932,000 Ops/sec