Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0
Firefox 95
Windows
Desktop
2 years ago
Test name Executions per second
[MATCH] check str[i] before startsWith 50734710.0 Ops/sec
[MATCH] startsWith immediatly 50918310.0 Ops/sec
[NOT MATCH] check str[i] before startsWith 1400821000.0 Ops/sec
[NOT MATCH] startsWith immediatly 52352710.0 Ops/sec
Script Preparation code:
Tests:
  • [MATCH] check str[i] before startsWith

  • [MATCH] startsWith immediatly

  • [NOT MATCH] check str[i] before startsWith

  • [NOT MATCH] startsWith immediatly