Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0
Chrome 128
Windows
Desktop
28 days ago
Test name Executions per second
Regex loop 366012.7 Ops/sec
Regex 412626.8 Ops/sec
Original 342656.2 Ops/sec
Original reversed 416777.4 Ops/sec
LastIndexOf 1154761.5 Ops/sec
LastIndexOf B 975925.1 Ops/sec
LastIndexOf 2 695135.7 Ops/sec
Script Preparation code:
Tests:
  • Regex loop

  • Regex

  • Original

  • Original reversed

  • LastIndexOf

  • LastIndexOf B

  • LastIndexOf 2


;