Run details:
Mozilla/5.0 (Linux; Android 12; CPH2005) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36
Chrome Mobile 109
Android
Mobile
one year ago
Test name Executions per second
regexp .test() 4586639.5 Ops/sec
string .match() 3592467.2 Ops/sec
indexOf === 0 6950780.0 Ops/sec
string .startsWith() 4266378.5 Ops/sec
Script Preparation code:
Tests:
  • regexp .test()

  • string .match()

  • indexOf === 0

  • string .startsWith()