Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/122.0
Firefox 122
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
regex start 896.1 Ops/sec
startsWith 502.8 Ops/sec
regex end 800.9 Ops/sec
endsWith 499.9 Ops/sec
indexOf start 16862.0 Ops/sec
indexOf end 16899.5 Ops/sec
charAt end 2189.7 Ops/sec
charCodeAt end 2334.6 Ops/sec
charCodeAt start 2235.1 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