Post

 Resources 

Console


Trig optimizations Jay Wheeler (1 reply, 0 views) (2000-Jun-30)
-
Hey guys, I was trying to make a "Math" class that uses lookup tables to optimize the trig functions. My first call is to 'init' like this: math.init(255) 'initialize a lookup table with 255 entries At this point, it calculates the sines and cosines for every angle between 0 and 2*pi with 255 "degrees" of accuracy. But here's my problem: it's somewhat (30%) slower (compiled, etc.) than the built in trig functions! I know this is a common optimization in C++, but has anybody successfully done this with VB? Note: my lookup function still needs one divide to determine which slot in the array it should be referencing.


-
Back to Forum

RE: Trig optimizations David Goodlad (0 replies) (2000-Jun-30)

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 127 visitors within the last 20 minutes
RSS News Feed