Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Firefox/98.0
Firefox 98
Mac OS X 10.15
Desktop
2 years ago
Test name Executions per second
text.includes() 32064188.0 Ops/sec
regex.test() 19848046.0 Ops/sec
string.match() 12891068.0 Ops/sec
string.indexOf() 24504770.0 Ops/sec
Script Preparation code:
Tests:
  • text.includes()

  • regex.test()

  • string.match()

  • string.indexOf()