|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
LUT for trigonometryHell group
Can someone tell me if LookUpTables for Trigonometry value (sine, cosine) are still useful today with CPU working in Gigahertz, when speed is of prime concern. Thank you On Sun, 16 Oct 2005 13:59:14 -0400, Jacquelin Hardy
<jacha***@videotron.ca> wrote: > Hell group Yes. > > Can someone tell me if LookUpTables for Trigonometry value (sine, cosine) > are still useful today with CPU working in Gigahertz, when speed is of prime > concern. > Take a look here: http://www.ti.com/graychip/GC1012A/GC1012A.html Also any other item in the Graychip line. These puppies have a built-in cosine table because they MUST do calculations continuously at high speed. Try this little excercise: Implement an algorithm to calculate sine and cosine functions. Now implement an algorithm to look up sine and cosine functions. Which is simpler? Which do you suppose executes faster? It is almost always possible to trade execution speed for memory. This is a great example of that. Jacquelin Hardy wrote:
> In addition to the most excellent response :) of Charles, I'll add it> Hell group > > Can someone tell me if LookUpTables for Trigonometry value (sine, cosine) > are still useful today with CPU working in Gigahertz, when speed is of prime > concern. > also depends on the numerical precision required and the rest of the application needs. Note that w/ VB, on is by definition speaking of Winders on Intel-compatible hardware w/ FPP hardware which has sin/cos instructions which are pretty good performance-wise. I've not looked at VB-generated code specfically to see the implementation but I'll note that if one needs better floating point computation speed w/ VB, one possible alternative is to write the computation code in Fortran and call it in a DLL. I do this routinely and depending on the application can see significant speed enhancements. |
|||||||||||||||||||||||