sine and cosine

BlitzMax Forums/BlitzMax Beginners Area/sine and cosine

all you have to provide is algorithms of as low a time complexity as possible.
ok: b=cos(a) or b=Array[a]. Wich one has the lowest time complexity?

It doesn't matter. Besides which it varies by FPU, and whether it can be executed in parallel.

Yes, that is why I said it's a matter of circumstance.

It is if it's already fast enough.
Duh!

No. the larger the loop, and the more objects you have in it, the more likely you are to get a cache miss.
Yes, the more the loop is "poluted" the less chance "your code" will be cached.
But, the cache stores copies of the data from the most frequently used main memory locations, so as long as "your code" apears relatively often in a loop the chances of a miss will be relatively low.