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()
    regexp .test() failure
    string .match() failure
    indexOf === 0 failure
    string .startsWith() failure

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0
Chrome 123 on Mac OS X 10.15.7
View result in a separate tab
indexOf === 0
26.7M/s
indexOf === 0 failure
26.4M/s
string .startsWith()
19.7M/s
string .startsWith() failure
19.7M/s
regexp .test() failure
17.6M/s
regexp .test()
17.5M/s
string .match() failure
14.5M/s
string .match()
14.2M/s
View exact numbers
Test name Executions per second
indexOf === 0 26,731,626 Ops/sec
indexOf === 0 failure 26,399,540 Ops/sec
string .startsWith() 19,714,600 Ops/sec
string .startsWith() failure 19,662,736 Ops/sec
regexp .test() failure 17,556,494 Ops/sec
regexp .test() 17,450,186 Ops/sec
string .match() failure 14,471,784 Ops/sec
string .match() 14,155,647 Ops/sec