Run details:
Mozilla/5.0 (Android 11; Mobile; rv:105.0) Gecko/105.0 Firefox/105.0
Firefox Mobile 105
Android
Mobile
2 years ago
Test name Executions per second
regexp .test() 17464388.0 Ops/sec
string .match() 9997836.0 Ops/sec
indexOf === 0 684578176.0 Ops/sec
string .startsWith() 679161408.0 Ops/sec
Script Preparation code:
Tests:
  • regexp .test()

  • string .match()

  • indexOf === 0

  • string .startsWith()