Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Chrome 142
Linux
Desktop
5 months ago
Test name Executions per second
regex start 561.8 Ops/sec
startsWith 1281.7 Ops/sec
regex end 521.1 Ops/sec
endsWith 1051.7 Ops/sec
indexOf start 11765.9 Ops/sec
indexOf end 12022.0 Ops/sec
charAt end 870.2 Ops/sec
charCodeAt end 926.3 Ops/sec
charCodeAt start 1076.9 Ops/sec
substring 12229.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

  • substring