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

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

Do you want proof? Instead of just making a statement Epicboy why dont you prove it? I have. Run the code below that shows I am right and you are wrong (as usual).

The results on my Cel(2GHz) were as follows....

On the fly took 31 milliseconds
Pre-calced tables took 1 millisecond
Actually, EpicBoy is closer to the truth. There was another thread on this recently (it's in here somewhere) and people found out that the faster processors could actually compute the math faster than they could look up the tables (because they had to slow down to RAM access speed). Nowadays, it actually does depend on the system you are running it on. As far as SIN/COS are concerned, it's not realy worth the effort worrying about anymore.

If you want a real test, you should run it on MANY systems and compare the results. But as EpicBoy said, it hardly matters in most cases.