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.

Wolrun....

Your first example on my machine....

On the fly = 30471 millisecs
Look up tables = 157 millisecs

The look up tables are still roughly 200 times faster using floating point numbers.

Your second example was rather interesting because it crashed Blitz Plus! However, removing three digits from the right allowed the program to run and....

On The Fly = 51 millisecs
Lookup Tables = 0 millisecs

Conclusion.....

According to my tests using INT's are roughly 300 times faster and FLOATS are roughly 200 times faster. Which ever way you look at it, Lookup tables are much faster.