Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0
Firefox 110
Windows 7
Desktop
one year ago
Test name Executions per second
text.includes() 14283966.0 Ops/sec
regex.test() 10131791.0 Ops/sec
string.match() 6565474.5 Ops/sec
string.indexOf() 629572864.0 Ops/sec
Script Preparation code:
Tests:
  • text.includes()

  • regex.test()

  • string.match()

  • string.indexOf()