Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:96.0) Gecko/20100101 Firefox/96.0
Firefox 96
Mac OS X 10.15
Desktop
2 years ago
Test name Executions per second
startsWith positive 3088105.2 Ops/sec
indexOf positive 15057373.0 Ops/sec
lastIndexOf positive 4072404.0 Ops/sec
startsWith negative 24338824.0 Ops/sec
indexOf negative 12286017.0 Ops/sec
lastIndexOf negative 4256077.5 Ops/sec
substring positive 42987340.0 Ops/sec
substring negative 43957556.0 Ops/sec
Script Preparation code:
Tests:
  • startsWith positive

  • indexOf positive

  • lastIndexOf positive

  • startsWith negative

  • indexOf negative

  • lastIndexOf negative

  • substring positive

  • substring negative


;