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 1238287.9 Ops/sec
Regex 1406916.4 Ops/sec
Original 871842.9 Ops/sec
Original reversed 802742.4 Ops/sec
LastIndexOf 3860891.2 Ops/sec
LastIndexOf B 1128784.1 Ops/sec
LastIndexOf 2 725791.9 Ops/sec
Script Preparation code:
Tests:
  • Regex loop

  • Regex

  • Original

  • Original reversed

  • LastIndexOf

  • LastIndexOf B

  • LastIndexOf 2