Mac OS 9 Lives

Mac OS 9 Discussion => Development & Programming => Topic started by: OS923 on December 02, 2019, 08:32:34 AM

Title: DFA optimization
Post by: OS923 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.