Tests:

Historical Performance Data aggregated from 8 community runs

Desktop Results:
Chrome 8 runs
startsWith
56.5M/s
Regex
12.2M/s

Fastest: startsWith (4.6x faster)

View exact numbers
  • startsWith: 56,495,588 ops/sec
  • Regex: 12,184,791 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
    startsWith

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Chrome 149 on Mac OS X 10.15.7
View result in a separate tab
startsWith
57.1M/s
Regex
10.7M/s
View exact numbers
Test name Executions per second
startsWith 57,093,600 Ops/sec
Regex 10,656,233 Ops/sec