Small test programs like that will not produce realistic results. That Sin/Cos test is not a game engine, and as such is not a valid response to the original question, which related to the use of those functions within an actual game. Think of how many benchmarking tools actually use code from real programs or game engines to provide a more realistic result.
To accurately test whether look up tables would be faster than the processor's own functions, you would have to take all cache levels out of the equation, or ensure the caches were adequately flooded with data as would be representative of a real world game engine.
In a real world engine it is unlikely that the lookup table would be stored long term in the cache, and thus on a processor from Pentium level up, using lookup tables would most likely be SLOWER than using the internal functions, which are performed in few cycles. To load the lookup data from system RAM would actually take several processor cycles (processors being massively faster than RAM) and as such is far less efficient in reality for most cases.
Thus the need to profile your code to find out where the true bottlenecks are.
If however your target market is the 386SX, or your main loop and program code consists largely of Sin and Cos calls, by all means use lookup tables. For 99% of people, the performance difference will be negligible, or possibly worse.
To accurately test whether look up tables would be faster than the processor's own functions, you would have to take all cache levels out of the equation, or ensure the caches were adequately flooded with data as would be representative of a real world game engine.
In a real world engine it is unlikely that the lookup table would be stored long term in the cache, and thus on a processor from Pentium level up, using lookup tables would most likely be SLOWER than using the internal functions, which are performed in few cycles. To load the lookup data from system RAM would actually take several processor cycles (processors being massively faster than RAM) and as such is far less efficient in reality for most cases.
Thus the need to profile your code to find out where the true bottlenecks are.
If however your target market is the 386SX, or your main loop and program code consists largely of Sin and Cos calls, by all means use lookup tables. For 99% of people, the performance difference will be negligible, or possibly worse.