Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Mobile Safari/537.36
Chrome Mobile 117
Android
Mobile
one year ago
Test name Executions per second
regex start 296.3 Ops/sec
startsWith 657.7 Ops/sec
regex end 282.0 Ops/sec
endsWith 249.5 Ops/sec
indexOf start 3418.9 Ops/sec
indexOf end 3780.2 Ops/sec
charAt end 531.1 Ops/sec
charCodeAt end 578.8 Ops/sec
charCodeAt start 623.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • regex start

  • startsWith

  • regex end

  • endsWith

  • indexOf start

  • indexOf end

  • charAt end

  • charCodeAt end

  • charCodeAt start