Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome 109
Mac OS X 10.13.6
Desktop
one year ago
Test name Executions per second
text.includes() 6885021.5 Ops/sec
text.test() 5607889.5 Ops/sec
text.match() 4539884.0 Ops/sec
text.indexOf() 9549060.0 Ops/sec
text.search() 2262076.5 Ops/sec
Script Preparation code:
Tests:
  • text.includes()

  • text.test()

  • text.match()

  • text.indexOf()

  • text.search()