Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:71.0) Gecko/20100101 Firefox/71.0
Firefox 71
Mac OS X 10.12
Desktop
5 years ago
Test name Executions per second
regex start 338.9 Ops/sec
startsWith 293.6 Ops/sec
regex end 327.8 Ops/sec
endsWith 295.0 Ops/sec
indexOf start 213.4 Ops/sec
indexOf end 230.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end