Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.80 Safari/537.36
Chrome 75
Mac OS X 10.12.6
Desktop
4 years ago
Test name Executions per second
regex start 364.7 Ops/sec
startsWith 144.7 Ops/sec
regex end 333.9 Ops/sec
endsWith 146.6 Ops/sec
indexOf start 828.6 Ops/sec
indexOf end 132.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end