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

  • regex.test()

  • string.match()

  • string.indexOf()


;