Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Chrome 106
Windows 7
Desktop
2 years ago
Test name Executions per second
regex start 141.2 Ops/sec
startsWith 284.6 Ops/sec
regex end 115.8 Ops/sec
endsWith 334.7 Ops/sec
indexOf start 994.1 Ops/sec
indexOf end 1161.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end