Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0
Firefox 117
Ubuntu
Desktop
one year ago
Test name Executions per second
regex start 418.2 Ops/sec
startsWith 404.2 Ops/sec
regex end 381.6 Ops/sec
endsWith 382.6 Ops/sec
indexOf start 5000.0 Ops/sec
indexOf end 8388.6 Ops/sec
charAt end 881.6 Ops/sec
charCodeAt end 879.7 Ops/sec
charCodeAt start 798.3 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