Stuart Stevenson wrote: > Gentlemen, > which style of computation would run faster in the kinematics file? > > this: > va1=atan(askew1) > > va2=atan(-bskew1) > <snip> > or this: > acomp=asin(((((sin(acmd))-(((cos(acmd))*(sin(-bcmd)))*$ > > (tan((atan(-bskew1))))))*(cos((atan(-bskew1)))))/$ > <snip> count up the number of sin, cos, etc. functions. If it is the same, then the time should be very close either way. If you just pulled all the equations apart to store every temp result in a variable, the compiler will end up generating the identical code. If you want, you could actually write a little program with a random number generator feeding your equations, and make it execute it in a loop 10,000 times. Run it with the Linux "time" command. Don't have the program write anything to the screen, but maybe store the values in an array so it doesn't get optimized away. Run both versions and compare.
Jon ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users