Script Preparation code:
Tests:
  • regexp .test()

  • string .match()

  • indexOf === 0

  • string .startsWith()

  • Equality

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    regexp .test()
    string .match()
    indexOf === 0
    string .startsWith()
    Equality

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 months ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.1 Mobile/15E148 Safari/604.1
Mobile Safari 26 on iOS 18.7
View result in a separate tab
Test name Executions per second
regexp .test() 385790304.0 Ops/sec
string .match() 158040832.0 Ops/sec
indexOf === 0 881082112.0 Ops/sec
string .startsWith() 83451432.0 Ops/sec
Equality 80944496.0 Ops/sec