Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/91.0.4472.80 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 91
iOS 13.5
Mobile
2 years ago
Test name Executions per second
regex start 219.2 Ops/sec
startsWith 215.6 Ops/sec
regex end 156.9 Ops/sec
endsWith 215.7 Ops/sec
indexOf start 162.9 Ops/sec
indexOf end 159.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end