Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111
Android
Desktop
one year ago
Test name Executions per second
regex start 229.3 Ops/sec
startsWith 216.1 Ops/sec
regex end 220.6 Ops/sec
endsWith 246.1 Ops/sec
indexOf start 2430.5 Ops/sec
indexOf end 2408.9 Ops/sec
charAt end 206.2 Ops/sec
charCodeAt end 203.8 Ops/sec
charCodeAt start 201.0 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