Script Preparation code:
Tests:
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: 9 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
indexOf === 0
881.1M/s
regexp .test()
385.8M/s
string .match()
158.0M/s
string .startsWith()
83.5M/s
Equality
80.9M/s
View exact numbers
Test name Executions per second
indexOf === 0 881,082,112 Ops/sec
regexp .test() 385,790,304 Ops/sec
string .match() 158,040,832 Ops/sec
string .startsWith() 83,451,432 Ops/sec
Equality 80,944,496 Ops/sec