Run details:
Mozilla/5.0 (Linux; Android 6.0.1; SM-J500M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.88 Mobile Safari/537.36
Chrome Mobile 91
Android 6.0.1
Mobile
3 years ago
Test name Executions per second
regex start 31.5 Ops/sec
startsWith 22.9 Ops/sec
regex end 30.6 Ops/sec
endsWith 22.5 Ops/sec
indexOf start 50.0 Ops/sec
indexOf end 14.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end