Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Chrome 129
Linux
Desktop
2 months ago
Test name Executions per second
regex start 392.9 Ops/sec
startsWith 779.2 Ops/sec
regex end 349.2 Ops/sec
endsWith 922.0 Ops/sec
indexOf start 7563.1 Ops/sec
indexOf end 7481.7 Ops/sec
charAt end 731.1 Ops/sec
charCodeAt end 842.6 Ops/sec
charCodeAt start 833.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