Run details:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:66.0) Gecko/20100101 Firefox/66.0
Firefox 66
Windows 7
Desktop
3 years ago
Test name Executions per second
regex start 264.5 Ops/sec
startsWith 161.0 Ops/sec
regex end 179.1 Ops/sec
endsWith 119.1 Ops/sec
indexOf start 164.9 Ops/sec
indexOf end 158.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end