Run details:
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0
Firefox 95
Fedora
Desktop
2 years ago
Test name Executions per second
lastIndexOf (near end) 870581.0 Ops/sec
indexOf (near end) 27161.1 Ops/sec
lastIndexOf (near head) 24040.2 Ops/sec
indexOf (near head) 972110.4 Ops/sec
Script Preparation code:
Tests:
  • lastIndexOf (near end)

  • indexOf (near end)

  • lastIndexOf (near head)

  • indexOf (near head)