Kap, Re: "Are you saying that large switch statements are frivolous and never happen in real life?"
Large switch statements happen, but they are rare. There are many routes to take besides resorting to large switch statements. Being the prime programmer you claim to be, you ought to know that. Now, compound a large switch statement with a completely random and arbitrary switch variable. Sure, it can happen if the variable is unpredictable, but normally switch statements tend to compensate for long branch structures, and those are likely to number sequentially, not randomly. Then, you take that rare, large switch statement, and put it in an even larger outer loop. Ever study 'O' notation, Kap? It's a rudimentary computer science concept, so any first year programmer could tell that your program is going to have poor performance (on any CPU). Finally, you specifically engineer the numbers so that it doesn't fits in the cache of the CPU. You even admitted in your last post that your block of code does not model any kind of real world application. You specifically engineered it (and probably took you a long time) to perform terribly on the Pentium 4 core. And it proves nothing.
wbmw |