Script Preparation code:
Tests:
  • text.includes()

  • regex.test()

  • string.match()

  • string.indexOf()

  • string.indexOf() !== -1

  • string.indexOf() != -1

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    text.includes()
    regex.test()
    string.match()
    string.indexOf()
    string.indexOf() !== -1
    string.indexOf() != -1

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Linux; Android 12; M2102J20SG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.5481.192 Mobile Safari/537.36 OPR/74.1.3922.71199
Opera Mobile 74 on Android
View result in a separate tab
Test name Executions per second
text.includes() 10255343.0 Ops/sec
regex.test() 6247741.0 Ops/sec
string.match() 5213704.5 Ops/sec
string.indexOf() 10285840.0 Ops/sec
string.indexOf() !== -1 10343002.0 Ops/sec
string.indexOf() != -1 10395946.0 Ops/sec


;