Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36
Chrome 73
Mac OS X 10.13.6
Desktop
5 years ago
Test name Executions per second
regex start 416.4 Ops/sec
startsWith 203.2 Ops/sec
regex end 381.3 Ops/sec
endsWith 205.1 Ops/sec
indexOf start 1168.5 Ops/sec
indexOf end 178.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end


;