Run details:
Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/114.0.5735.196 Mobile DuckDuckGo/5 Safari/537.36
Chrome Mobile 114
Android
Mobile
one year ago
Test name Executions per second
regex start 404.0 Ops/sec
startsWith 442.0 Ops/sec
regex end 330.4 Ops/sec
endsWith 340.9 Ops/sec
indexOf start 3641.4 Ops/sec
indexOf end 3726.4 Ops/sec
charAt end 343.9 Ops/sec
charCodeAt end 377.4 Ops/sec
charCodeAt start 406.6 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