Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0
Firefox 133
Windows
Desktop
17 days ago
Test name Executions per second
regexp .test() 30744750.0 Ops/sec
string .match() 13008917.0 Ops/sec
indexOf === 0 846567296.0 Ops/sec
string .startsWith() 930579968.0 Ops/sec
Script Preparation code:
Tests:
  • regexp .test()

  • string .match()

  • indexOf === 0

  • string .startsWith()