Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0
Firefox 131
Windows
Desktop
27 days ago
Test name Executions per second
Regex loop 1224273.1 Ops/sec
Regex 1440912.9 Ops/sec
Original 882344.2 Ops/sec
Original reversed 811112.9 Ops/sec
LastIndexOf 3897747.5 Ops/sec
LastIndexOf B 1176858.1 Ops/sec
LastIndexOf 2 722780.4 Ops/sec
Script Preparation code:
Tests:
  • Regex loop

  • Regex

  • Original

  • Original reversed

  • LastIndexOf

  • LastIndexOf B

  • LastIndexOf 2


;