Author Topic: DFA optimization  (Read 3020 times)

Offline OS923

  • Platinum Member
  • *****
  • Posts: 888
DFA optimization
« on: December 02, 2019, 08:32:34 AM »
If you use a DFA in your program, then let the debug version count how many times you arrive in each state. Then sort your comparisons (especially if you use a switch statement).

I did this with a DFA with 9 states and my program suddenly worked 4 times faster.