Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Chrome 75
Windows 7
Desktop
4 years ago
Test name Executions per second
regex start 306.8 Ops/sec
startsWith 101.3 Ops/sec
regex end 275.9 Ops/sec
endsWith 109.8 Ops/sec
indexOf start 674.8 Ops/sec
indexOf end 121.3 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end