Script Preparation code:
Tests:
  • RegExp.test(String)

  • String.match(RegExp)

  • String.indexOf()

  • String.startsWith()

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    RegExp.test(String)
    String.match(RegExp)
    String.indexOf()
    String.startsWith()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
Chrome 102 on Windows 7
View result in a separate tab
Test name Executions per second
RegExp.test(String) 4564109.0 Ops/sec
String.match(RegExp) 3687145.5 Ops/sec
String.indexOf() 6121560.0 Ops/sec
String.startsWith() 5091746.5 Ops/sec


;