Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36
Chrome 72
Mac OS X 10.14.2
Desktop
5 years ago
Test name Executions per second
regex start 243.4 Ops/sec
startsWith 114.0 Ops/sec
regex end 230.1 Ops/sec
endsWith 124.7 Ops/sec
indexOf start 596.4 Ops/sec
indexOf end 108.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end