Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Whale/2.9.114.33 Safari/537.36
Chrome 86
Windows
Desktop
3 years ago
Test name Executions per second
regex start 523.2 Ops/sec
startsWith 662.0 Ops/sec
regex end 473.5 Ops/sec
endsWith 658.5 Ops/sec
indexOf start 9847.9 Ops/sec
indexOf end 9678.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end