Dax....
You have answered your own question! Lookup tables will give a better performance on ANY system where as calculating on the fly may induce slowdown on older systems.
Why design two systems when one will do the job?
Rob....
I agree with what you (and Epicboy) say about other factors but the fact remains that mappings are so much faster than calculations. The overhead is bigger because of the arrays, but it is worth it for the extra speed you gain. Run the code in my previous post. Change the ITERATIONS value to 1000 and view the results. You are looking at a speed increase of 300 TIMES FASTER using lookup tables!
Mappings are FAST! Calculations are Slooowwwwwwwww!
You have answered your own question! Lookup tables will give a better performance on ANY system where as calculating on the fly may induce slowdown on older systems.
Why design two systems when one will do the job?
Rob....
I agree with what you (and Epicboy) say about other factors but the fact remains that mappings are so much faster than calculations. The overhead is bigger because of the arrays, but it is worth it for the extra speed you gain. Run the code in my previous post. Change the ITERATIONS value to 1000 and view the results. You are looking at a speed increase of 300 TIMES FASTER using lookup tables!
Mappings are FAST! Calculations are Slooowwwwwwwww!