Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:127.0) Gecko/20100101 Firefox/127.0
Firefox 127
Mac OS X 10.15
Desktop
6 months ago
Test name Executions per second
text.includes() 1900512000.0 Ops/sec
regex.test() 53606580.0 Ops/sec
string.match() 32612934.0 Ops/sec
string.indexOf() 1817941888.0 Ops/sec
Script Preparation code:
Tests:
  • text.includes()

  • regex.test()

  • string.match()

  • string.indexOf()