Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 OPR/99.0.0.0
Opera 99
Windows
Desktop
one year ago
Test name Executions per second
text.includes() 31866068.0 Ops/sec
text.test() 20267854.0 Ops/sec
text.match() 16850680.0 Ops/sec
text.indexOf() 31951072.0 Ops/sec
text.search() 9007357.0 Ops/sec
Script Preparation code:
Tests:
  • text.includes()

  • text.test()

  • text.match()

  • text.indexOf()

  • text.search()