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

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

Well, not keen to add fire to this argument, but I can say that my game won't run full speed without look up tables.

Let's see, there's a heat haze effect, needing two passes, one with about 350 cos operations and about 250 sin operation per frame.

It runs very comfortably on my Athlon 1.33ghz using a look up, but crawls at about 40fps if I do the math on the fly.

I've not had a chance to test it on a more powerful CPU, but I find it difficult to believe new processors find it faster to calculate sin than to access a memory field. Still when I finally upgrade I may be proved wrong. We will see.


But unless I'm only using a handlful of math, the look up tables always improve things for me.