quote:
Original post by Axter
It seems the asm version is only useful if you want to calculate both the sin and cos values of an angle at the same time. Otherwise it's not worth the hassle.
quote:
Original post by Beer Hunter
What did you expect?
I was merely stating this because it was implied (not necessarily by you) that some compilers might not use the latest features of the hardware. As far as sin, cos etc. goes on VC++ at least, this does not seem to be a problem. So it’s not necessary to implement an asm version.
A quick and dirty table lookup method I checked ran roughly twice as fast as the fsin call, but as was mentioned before, the fact that you need to access a large lookup table that would screw with the cache might not be significantly better to warrant the added effort, time, and loss in accuracy to bother in the first place. What I’m saying is, the table ran faster, but in a real situation where there’s other stuff going on as well, the additional cache misses that would result because of other parts of the program also accessing memory, etc, results would probably be worse than in the ideal test case that I did. You might only gain 10% or whatever, not worth the hassle.
SS
Edited by - Axter on February 11, 2002 1:15:00 PM