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() 3296805.5 Ops/sec
string .match() 2618458.5 Ops/sec
indexOf === 0 5137388.5 Ops/sec
string .startsWith() 4035327.0 Ops/sec
Script Preparation code:
Tests:
  • regexp .test()

  • string .match()

  • indexOf === 0

  • string .startsWith()


;