Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_7_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1
Mobile Safari 16
iOS 16.7.8
Mobile
3 months ago
Test name Executions per second
text.includes() 6342960.0 Ops/sec
regex.test() 7680916.0 Ops/sec
string.match() 5274068.5 Ops/sec
string.indexOf() 3812369.2 Ops/sec
Script Preparation code:
Tests:
  • text.includes()

  • regex.test()

  • string.match()

  • string.indexOf()


;