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() 2320531.5 Ops/sec
string .match() 1891519.1 Ops/sec
indexOf === 0 3398682.2 Ops/sec
string .startsWith() 2687571.2 Ops/sec
Script Preparation code:
Tests:
  • regexp .test()

  • string .match()

  • indexOf === 0

  • string .startsWith()


;