Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36
Chrome Mobile 126
Android
Mobile
4 months ago
Test name Executions per second
regexp .test() 8634932.0 Ops/sec
string .match() 6949580.0 Ops/sec
indexOf === 0 13442198.0 Ops/sec
string .startsWith() 11448235.0 Ops/sec
Script Preparation code:
Tests:
  • regexp .test()

  • string .match()

  • indexOf === 0

  • string .startsWith()