Sin/Cos Lookup Tables

Blitz3D Forums/Blitz3D Programming/Sin/Cos Lookup Tables

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.

I’m not saying local variables are faster than global – just that they often are, so if it matters to you check before assuming you need to use the less desirable global variable in the name of efficiency. Local variables can also all use the same memory locations – very important on processors that have very little memory.

Your assumption that 2 * X is slower than X + X is based on the assumption that a multiply is slower than an add. I don’t know for the Pentium but that is not always the case. In the vast majority of expressions in your program you will never notice the difference anyway.