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.

Good god, I can't believe this childish bickering is still continuing.

My own contribution to the original question: yes, in my last project I did use pre-calc tables. However, only for part of it. It was for a routine that performed alot more than just a SIN calculation, and sometimes did it many times per loop. I precalculated the whole formula and stuffed it into a bank. It had an impact, I'd estimate, of about 6% or so, largest case. When I tried substituting the simpler stuff with SIN tables, I couldn't even tell if it was making any difference. If it was, it was so insignificant compared to what else was going on, I simply couldn't tell. I could create a few test programs, but they wouldn't necessarily accurately reflect a real-world scenario.

So yeah, I suppose if I was doing a humungous number of SIN calcs, especially as part of a larger equation, I would most likely precalculate the entire equation. But to be honest, it will depend upon the program and how heavy the usage is as to whether or not tables are worth bothering with.