Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0
Firefox 131
Windows
Desktop
2 months ago
Test name Executions per second
Regex loop 1358212.1 Ops/sec
Regex 1298139.8 Ops/sec
Original 859277.2 Ops/sec
Original reversed 770236.8 Ops/sec
LastIndexOf 3863158.2 Ops/sec
LastIndexOf B 1479613.4 Ops/sec
LastIndexOf 2 899295.1 Ops/sec
Script Preparation code:
Tests:
  • Regex loop

  • Regex

  • Original

  • Original reversed

  • LastIndexOf

  • LastIndexOf B

  • LastIndexOf 2