Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Chrome 76
Windows
Desktop
5 years ago
Test name Executions per second
regex start 369.4 Ops/sec
startsWith 317.1 Ops/sec
regex end 333.4 Ops/sec
endsWith 326.6 Ops/sec
indexOf start 4231.3 Ops/sec
indexOf end 3542.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end