Run details:
Mozilla/5.0 (Linux; Android 13; LE2123) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36
Chrome Mobile 108
Android
Mobile
2 years ago
Test name Executions per second
Using indexOf 51.3 Ops/sec
Using lastIndexOf 41.9 Ops/sec
Using a Set 461.1 Ops/sec
Script Preparation code:
Tests:
  • Using indexOf

  • Using lastIndexOf

  • Using a Set