Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36
Chrome 91
Windows 7
Desktop
2 years ago
Test name Executions per second
regex start 228.4 Ops/sec
startsWith 303.6 Ops/sec
regex end 203.9 Ops/sec
endsWith 294.8 Ops/sec
indexOf start 4990.8 Ops/sec
indexOf end 5249.3 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end