Run details:
Mozilla/5.0 (Linux; Android 13; SM-S908E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Mobile Safari/537.36
Chrome Mobile 110
Android
Mobile
one year ago
Test name Executions per second
regex start 470.5 Ops/sec
startsWith 466.2 Ops/sec
regex end 448.1 Ops/sec
endsWith 480.0 Ops/sec
indexOf start 3479.5 Ops/sec
indexOf end 877.2 Ops/sec
charAt end 152.5 Ops/sec
charCodeAt end 446.3 Ops/sec
charCodeAt start 461.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