Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.99 Safari/537.36
Chrome 93
Windows 7
Desktop
2 years ago
Test name Executions per second
regex start 308.4 Ops/sec
startsWith 401.8 Ops/sec
regex end 281.3 Ops/sec
endsWith 392.5 Ops/sec
indexOf start 5485.9 Ops/sec
indexOf end 5443.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end


;