??? 09/02/07 02:39 Read: times |
#143878 - tradeoffs Responding to: ???'s previous message |
Joseph Hebert said:
I'm curious for you to explain your take of state machines and look up tables. Why do you consider them more valuable than a well stated algorithm, or an iterative process, affecting the underlying mathematics? Lookup tables are often faster than an appropriate algorithm. Then it's a trade-off between speed and memory. (I've seen this grossly abused.) State machines are based on mathematics (finite automata for those not familiar with the subject). Implementing them without an understanding of the underlying math may be hazardous to one's sanity ;-) What it comes down to, as usual, is choosing the right tool for the job. Those who unthinkingly choose lookup tables, state machines, or whatever, without understanding the math are much like the workman who has only a hammer in his toolbox--every problem looks like a nail. Having said that though, I would say that lookup tables and state machines are frequently the best tool for the job. |