Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Chrome 76
Mac OS X 10.14.0
Desktop
5 years ago
Test name Executions per second
regex start 324.9 Ops/sec
startsWith 146.8 Ops/sec
regex end 300.2 Ops/sec
endsWith 133.0 Ops/sec
indexOf start 779.0 Ops/sec
indexOf end 142.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end