Run details:
Mozilla/5.0 (Linux; Android 11; SM-M515F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Mobile Safari/537.36
Chrome Mobile 92
Android
Mobile
3 years ago
Test name Executions per second
regexp .test() 3273815.2 Ops/sec
string .match() 2580123.8 Ops/sec
indexOf === 0 5087829.0 Ops/sec
string .startsWith() 4030345.8 Ops/sec
Script Preparation code:
Tests:
  • regexp .test()

  • string .match()

  • indexOf === 0

  • string .startsWith()


;