quick poll - precalc sin & cos or perform every frame ?

BlitzPlus Forums/BlitzPlus Programming/quick poll - precalc sin & cos or perform every frame ?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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!