Run details:
Mozilla/5.0 (Linux; Android 10; M2007J20CG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.115 Mobile Safari/537.36
Chrome Mobile 92
Android
Mobile
2 years ago
Test name Executions per second
regex start 236.5 Ops/sec
startsWith 240.1 Ops/sec
regex end 223.8 Ops/sec
endsWith 237.5 Ops/sec
indexOf start 3073.4 Ops/sec
indexOf end 3096.0 Ops/sec
charAt end 222.3 Ops/sec
charCodeAt end 223.1 Ops/sec
charCodeAt start 221.2 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