Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0
Firefox 143
Linux
Desktop
7 months ago
Test name Executions per second
regexp .test() 50680324.0 Ops/sec
string .match() 31238302.0 Ops/sec
indexOf === 0 1920136192.0 Ops/sec
string .startsWith() 1914088576.0 Ops/sec
Script Preparation code:
Tests:
  • regexp .test()

  • string .match()

  • indexOf === 0

  • string .startsWith()