Sin and Cos can take decimals as well, which means you'll need far more than 360 items, unless you don't care about accuracy. The initial post used decimal angles, so presumably more accuracy is required for that poster.
The large array was intended to make the test depend upon memory speed also. Unfortunately as pointed out before, 360 elements is small enough to fit in most caches. Running your test on my Athlon 1700 with all cache disabled yielded near identical results under Blitz3D (the lack of cache also made the machine slow as hell.)
Your observation of it being only 9 times faster is due to the fact the array is no longer being read sequentially, as I noted above.
The massive performance differences between Blitz3D and BlitzPlus aren't encouraging. I wouldn't mind knowing what's behind that.
For a potentially larger lookup table, under more realistic conditions (within in a game) and for Blitz3D, there appears to be little reason to use a lookup table. Under BlitzPlus, the real performance is similar within a realistic game environment.
If you are using only 360 elements under BlitzPlus, and calling a _lot_ of trig functions, I'd recommend using a lookup array at this stage. Over more elements, the array overhead makes it less worthwhile though.
For those using tens of sin or cos calls with a loop, the results here at least would indicate using a lookup array is a bit of a waste of time, changing your code to do only 1000 iterations should be proof enough of that.
Your best bet, as myself and others have repeatedly pointed out, is to profile your code to see which bits are performing poorly, and act accordingly.
The large array was intended to make the test depend upon memory speed also. Unfortunately as pointed out before, 360 elements is small enough to fit in most caches. Running your test on my Athlon 1700 with all cache disabled yielded near identical results under Blitz3D (the lack of cache also made the machine slow as hell.)
Your observation of it being only 9 times faster is due to the fact the array is no longer being read sequentially, as I noted above.
The massive performance differences between Blitz3D and BlitzPlus aren't encouraging. I wouldn't mind knowing what's behind that.
For a potentially larger lookup table, under more realistic conditions (within in a game) and for Blitz3D, there appears to be little reason to use a lookup table. Under BlitzPlus, the real performance is similar within a realistic game environment.
If you are using only 360 elements under BlitzPlus, and calling a _lot_ of trig functions, I'd recommend using a lookup array at this stage. Over more elements, the array overhead makes it less worthwhile though.
For those using tens of sin or cos calls with a loop, the results here at least would indicate using a lookup array is a bit of a waste of time, changing your code to do only 1000 iterations should be proof enough of that.
Your best bet, as myself and others have repeatedly pointed out, is to profile your code to see which bits are performing poorly, and act accordingly.