Script Preparation code:
Tests:
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

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

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121 on Linux
View result in a separate tab
string.indexOf()
13.8M/s
text.includes()
13.8M/s
regex.test()
8.7M/s
string.match()
7.2M/s
View exact numbers
Test name Executions per second
string.indexOf() 13,833,514 Ops/sec
text.includes() 13,770,596 Ops/sec
regex.test() 8,742,252 Ops/sec
string.match() 7,179,322 Ops/sec