Script Preparation code:
AخA
 
var url = 'https://www.google.com/matchthis/other/args'
Tests:
  • text.includes()

     
    url.includes('matchthis')
  • text.test()

     
    /matchthis/.test(url)
  • text.match()

     
    url.match(/matchthis/).length >= 0
  • text.indexOf()

     
    url.indexOf('matchthis') >= 0
  • text.search()

     
    url.search('matchthis') >= 0
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    text.includes()
    text.test()
    text.match()
    text.indexOf()
    text.search()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 11 months ago)
Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0
Firefox 123 on Linux
View result in a separate tab
Test name Executions per second
text.includes() 1568332800.0 Ops/sec
text.test() 28498808.0 Ops/sec
text.match() 12492502.0 Ops/sec
text.indexOf() 1625002752.0 Ops/sec
text.search() 19803168.0 Ops/sec