Pages: [1]   Go Down

Author Topic: DFA optimization  (Read 3735 times)

OS923

  • 512 MB
  • *****
  • 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.
Logged
Pages: [1]   Go Up
 

Recent Topics