Run details:
Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Chrome 126
Chrome OS 14541.0.0
Desktop
21 days ago
Test name Executions per second
text.includes() 40483212.0 Ops/sec
regex.test() 8429639.0 Ops/sec
string.match() 6005011.0 Ops/sec
string.indexOf() 41471324.0 Ops/sec
Script Preparation code:
Tests:
  • text.includes()

  • regex.test()

  • string.match()

  • string.indexOf()