Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) EdgiOS/110.0.1587.63 Version/16.0 Mobile/15E148 Safari/604.1
Mobile Safari 16
iOS 16.3
Mobile
one year ago
Test name Executions per second
text.includes() 14894257.0 Ops/sec
regex.test() 16905898.0 Ops/sec
string.match() 11648805.0 Ops/sec
string.indexOf() 13831456.0 Ops/sec
Script Preparation code:
Tests:
  • text.includes()

  • regex.test()

  • string.match()

  • string.indexOf()