Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/120.0.6099.101 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 120
iOS 16.6
Mobile
one year ago
Test name Executions per second
text.includes() 9432426.0 Ops/sec
regex.test() 10445250.0 Ops/sec
string.match() 7783570.5 Ops/sec
string.indexOf() 10368297.0 Ops/sec
Script Preparation code:
Tests:
  • text.includes()

  • regex.test()

  • string.match()

  • string.indexOf()