Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0
Firefox 102
Windows 7
Desktop
one year ago
Test name Executions per second
text.includes() 28494288.0 Ops/sec
regex.test() 16414742.0 Ops/sec
string.match() 9957294.0 Ops/sec
string.indexOf() 24584374.0 Ops/sec
Script Preparation code:
Tests:
  • text.includes()

  • regex.test()

  • string.match()

  • string.indexOf()