Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0
Firefox 119
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
Using indexOf 77.3 Ops/sec
Using lastIndexOf 79.1 Ops/sec
Using a Set 172.8 Ops/sec
Script Preparation code:
Tests:
  • Using indexOf

  • Using lastIndexOf

  • Using a Set